Every frame, my program will receive a new image from a USB video camera. This image will initially be in CPU memory. What's the fastest method in OpenGL to draw this image to the screen so that it fills the entire screen?
Currently, I'm uploading the image data to a texture and then rendering a fullscreen quad. However, this doesn't run very quickly on a different machine that I tried.
Currently, I'm uploading the image data to a texture and then rendering a fullscreen quad. However, this doesn't run very quickly on a different machine that tried. Any ideas? Thanks.
glTexImage2D does a full texture initialization (which means, allocation, object setup and the like). If you just want to replace the texture image with an image of the same size, use glTexSubImage2D, which is much faster. If you want to do this asynchonously, then have a look at Pixel Buffer Objects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With