View Full Version : Rendering video with OpenGL

Janne Heikkinen
05-31-2013, 12:08 AM
My first idea for this would be to draw two triangles using glDrawElements and then changing texture continuously with glTexImage2D.

I've been away from OpenGL couple years now and wondering if there's better way. Preferably in OpenGL 2.1 compatible way.

carsten neumann
05-31-2013, 08:47 AM
Take a look at the wiki pages on Buffer Object Streaming (http://www.opengl.org/wiki/Buffer_Object_Streaming) and Pixel Buffer Objects (http://www.opengl.org/wiki/Pixel_Buffer_Object), for ways to make the texture uploads more efficient. The basic idea is what you describe though, upload the video frames as textures and display them.