View Full Version : DO YOU KNOW ? Movie in OpenGL
05-19-2001, 02:40 AM
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?
05-19-2001, 07:39 AM
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.
05-19-2001, 02:08 PM
"some AVI library". That's funny :-)
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.