jo blue
04-06-2000, 04:49 AM
Hi !
I want to generate a texture between to frames, in order to draw it on a quad, during the next frames. To generate my texture, I render the desired scene, and I store the back buffer without displaying it.
That's OK, I can do it with the glReadPixels() function. It stores the buffer into the processor memory. Then I can create a texture object with glGenTexture2D() and use this texture object for the next frames.
But it is very slow, because the texture is send from the video memory to the processor memory (glReadPixels), and then from the processor memory to the video memory (glGenTexture2D). The texture generation has to be very fast, otherwise the frame rate of the main scene will collapse...
Is there a way to store my new texture directly into the video memory, as a texture object ? (kind of "readPixelsIntoTexture2D()" function ...)
Thank you for your help !
Aurelien
I want to generate a texture between to frames, in order to draw it on a quad, during the next frames. To generate my texture, I render the desired scene, and I store the back buffer without displaying it.
That's OK, I can do it with the glReadPixels() function. It stores the buffer into the processor memory. Then I can create a texture object with glGenTexture2D() and use this texture object for the next frames.
But it is very slow, because the texture is send from the video memory to the processor memory (glReadPixels), and then from the processor memory to the video memory (glGenTexture2D). The texture generation has to be very fast, otherwise the frame rate of the main scene will collapse...
Is there a way to store my new texture directly into the video memory, as a texture object ? (kind of "readPixelsIntoTexture2D()" function ...)
Thank you for your help !
Aurelien