What is the fastest way to create a new full-screen image for each frame in OpenGL?

Each frame, my program will receive a new image from a USB camcorder. First, this image will be in the processor memory. What is the fastest method in OpenGL to draw this image on the screen so that it fills the entire screen?

I am currently loading image data into a texture and then creating a full-screen quad. However, this does not work very fast on another machine that I tried.

+6
source share
2 answers

I am currently loading image data into a texture and then creating a full-screen quad. However, this is not very fast on another machine that tried. Any ideas? Thanks.

glTexImage2D performs a full initialization of the texture (which means distribution, object customization, etc.). If you 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 asynchronously, take a look at the pixel objects of the buffer

+7
source

Blitting is a possible solution and it discusses thread . However, they do not give an excellent overview.

+2
source

Source: https://habr.com/ru/post/897338/


All Articles