-
With the current work-in-progress WebGL backend ( #1686 ), following the strategy used by the This doesn't work out-of-the-box with Bevy at the moment, because Bevy tries to obtain the I did some trying to get Since a That leaves the only other solution that I can think of: rendering to an invisible canvas in the background until The advantage of the solution is that it should work and have no extra limitations compared to the other APIs such as Vulkan or OpenGL. But if it's way slower than without the extra canvas copy, that wouldn't be good. In summary, I see three options:
I'd really like to get some thoughts on which option we should go with or whether or not there are other possible options that might work. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I think this is problematic even on native without any Web stuff. Your adapter must be able to present on the surface, so if you are picking the adapter first, you are asking for a surprise later.
We are actually doing a blit for every frame on GL backend under GLES today. Are you trying to make WebGL different? |
Beta Was this translation helpful? Give feedback.
-
@cart If this isn't worth your time yet, feel free to ignore, but I'd like to get your feedback, if possible, on what you think about needing to create a surface before enumerating adapters when targeting web. If I understood correctly, that's now how Bevy works today, and I didn't look deeply into how hard it would be to make bevy do that. Do you think that would be a consideration? @kvark also mentioned above that it would probably be best to create the surface first anyway to make sure that the adapter you choose is able to present to the surface. If it's something we want to do I'm fine trying to do what's necessary on the Bevy side to get it working. |
Beta Was this translation helpful? Give feedback.
@cart If this isn't worth your time yet, feel free to ignore, but I'd like to get your feedback, if possible, on what you think about needing to create a surface before enumerating adapters when targeting web. If I understood correctly, that's now how Bevy works today, and I didn't look deeply into how hard it would be to make bevy do that.
Do you think that would be a consideration? @kvark also mentioned above that it would probably be best to create the surface first anyway to make sure that the adapter you choose is able to present to the surface.
If it's something we want to do I'm fine trying to do what's necessary on the Bevy side to get it working.