Rendering video with OpenGL

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.

Take a look at the wiki pages on Buffer Object Streaming and Pixel Buffer Objects, 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.