Compositing video and primitives in OpenGL

Basically I implemented some fireworks in openGL and i want to add those fireworks to this movie. I am using a camera tracker to get information about the camera location.

What is the easiest way to

  1. render the movie in openGL? I have saved each frame of the movie to an image file so i don’t have to worry about dealing with video formats. I am looking for simplicity/ease of programming so is it easier to do this by writing to a display buffer pixel by pixel or should I render each frame as a texture?

  2. How do I overlay my moving particles assuming that I have the camera positions and transformations that will be given to me from my camera tracker. Also all of the particles are just opengl point objects.

I don’t care about the running speed because I will just use a screen capture program to record all the frames and speed it up later. Either that i will just save everything that is in the display buffer to image files, one for each frame, then i will use a program to build the movie.

The easiest way to display pixels is to use glDrawPixels. If you don’t care about the speed it can be the way to go.

If you want speed and want to do some matrix transformations before displaying movie frame you should upload it to a texture and then render a quad with the texture applied.