How do I use video, or a sequence of frames as a texture? I have a animated sequence of gl planes, and want to replace my still image-textures with sequences
Easy, load the frames of your video as a different texture and each frame bind a different texture and draw your object.
Each frame the object will appear with a different texture giving the illusion of a movie.
Maybe not the most memory efficient way, but it works.
Ok, sounds real easy but I am trying to find a example of something in c++ that I can break down… anything that would help would be great.
Grab a copy of zsnes from cvs and then patch it with the opengl patch from:
http://www.students.uiuc.edu/~handuong/opengl.patch
It’s fairly straightforward. Zsnes uses ‘vidbuffer’ to store the output image. This is then cropped into ‘glvidbuffer’ and then ‘glvidbuffer’ is turned into a texture that gets mapped onto a single (almost) square.
hpsolo
in fact you could just look at the patch file itself starting with:
@@ -1023,6 +1056,42 @@
thanks for the help! Check out my app, its starting to become something, but it has a long way to go… would love to have some real coders on the team.
I’m about to do a total rewrite to use a c++ class to allow arrays of objects instead of hard-coded ones, and clips instead of stills for my textures.
http://sourceforge.net/projects/jahshakafx/
[This message has been edited by jahshaka (edited 05-24-2001).]
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.