Effective way to update texture in OpenGL

I wanted to make some video streams using OpenGL. I am currently using the glTexImage2D provided by JOGL and rendering in a Swing window. To update the texture contents for each video clip, I call glTexImage2D. I want to know if there is a faster way to update the texture without calling glTexImage2D for each frame.

+3
source share
2 answers

You will always use it glTexImage2D, but with the difference that the data comes from the buffer object ( what is this? ), And not from the pointer.

, , , () PCIe. glTexImage, OpenGL , , . ( , , OpenGL !). , .
, , .

: , - .
- , glBufferData .

, , , , . OpenGL , , . glBufferData - OpenGL, . , , .

"" , glMapBufferRange , , . ?
OpenGL , . , - , . glMapBufferRange , ( OpenGL) , " ". , , , / , , OpenGL . , (, ), .

+6

.


, glTexImage . , , ( ).

GPU, , 100% .

0

All Articles