DO YOU KNOW ? Movie in OpenGL

Hai…

Is there any FREE library/code/etc that can play movie file in my opengl app? Or does anybody has created some function to play movie in their opengl app? And what format of movie that it can play. How about playing *.avi format? I’ve heard something called *.bik. Is that a kind of movie format?

Please help…

There probably is an AVI library somewhere, try the MSDN.
To get a movie to play in OpenGL, you copy the current frame data from the movie into a texture (it is suggested that you use glTexSubImage2D) and then draw the texture.

“some AVI library”. That’s funny :slight_smile:

Both Video For Windows (now officially outdated) and DirectShow (nee DirectX Media, nee ActiveMovie) use AVI for their native format (DirectShow, which does OpenDML AVIs, also can use ASF reasonably well).

Just read up on the API of your choice, and call the four functions needed to open a movie file and start reading video frames into a bitmap. Then CopySubImage() that bitmap into your texture object, and your’e practically done.

If you don’t like reading documentation on the Windows APIs, there’s also sample code on the DirectX site which shows how to read video frames using DirectShow.