9 ms·
I believe you can do loading texture data onto the GPU from another thread with OpenGL with pixel buffer objects: https://www.khronos.org/opengl/wiki/Pixel_Buff
by Ono-Sendai 2y ago
I believe you can do loading texture data onto the GPU from another thread with OpenGL with pixel buffer objects: https://www.khronos.org/opengl/wiki/Pixel_Buffer_Object https://www.khronos.org/opengl/wiki/Pixel_Buffer_Object
I haven't tried it yet, but will try soon for my open-source metaverse Substrata: https://substrata.info/ https://substrata.info/.
- exDM69 2y agoIt is possible but managing asynchronous transfers in OpenGL is quite tricky. You either need to use OpenGL sync objects very carefully or accept the risk of unintended GPU stalls.
- Ono-Sendai 2y agoYeah you need to make sure the upload has completed before you try and use the texture, right?
- exDM69 2y agoYes, and you need to make sure that the upload has completed before you reuse the pixel buffer too. And the synchronization API isn't very awesome, it can only wait for all operations until a certain point have been completed. You can't easily track individual transfers.