How can i put the animation in openGl?

Started by
5 comments, last by Rasmadrak 17 years, 9 months ago
Hi,i want to put the naimation in the waterfall using OpneGl.How can i do this? can i load the viedo clip of water fall..n then load its tectuire? is it possible? if possible? then how can i do it? Thx Regards
Advertisement
First:

Make each of the frames in your animation a separate texture using a graphics program.

then:

Learn basic OpenGL programing -> nehe.gamedev.net
It is a great site for beginning to learn OpenGL.

Start from step one, and slowly advance!
You'll be drawing waterfalls soon enough! :)

Cheers!
"Game Maker For Life, probably never professional thou." =)
You need to do it yourself – load each frame of the video into a texture, and each frame change which texture the waterfall (a billboard?) uses.

You'll need some video loading software to do the first.
Is converting to Textures the only way?
For example... when watching a dvd movie on computer, I note that screenshots come up blank, Indicating the dvd software has some kind of direct memory stream to the video card...
Wouldn't it be possible to do something like that for your own animation video? (stream the data directly)
rather than convert to texture frames in system mem and send them one by one..?
Only if you are blitting directly to the screen (even then I don't know how to do it, but it's probably possible). If you want the animated object to be within a 3D scene and go through GL's projections, you need to break it up into GL textures.
i HVE TAKEN THE HELP FROM NEHE.GAMEDEV.NET//TO LOAD THE MOVIE FILE..THAT WAS LOADING THE FILE FRAME BY FRAME...AND THEM MAKING THIER TEXTURES...BUT AS I M DEVELOPING A GAME..I ALREADY LOADED TEXTURES OF TREES..AND SOME OTHER OBJECTS...IT IS SHOWING CONFLICTS WITH IT...I DONT KNOW WAT DO DO?
MOVIE CLIP IS NOT SHOING THE ANIMATIONS N LODED AT THE PLACES OF TREES...
IF NAY ON OF U KNOW ABT THIS PLZ HELP ME...

REGARDS

[Edited by - NooR on July 20, 2006 2:12:13 AM]
Hi.

First, please don't use ALL CAPS - it's considered rude. You won't get more help by "shouting".

Secondly, I'd suggest that you go through those tutorials and learn them, instead of cut'n'paste/modifying existing code.

Third, make sure that you load each texture into a separate piece of memory using some kind of texture manager, pseudo code:

struct texture{int id;somekindofdata *Texturedata;//other variables that you may need etc.};texture *Textures[MAX_NR_TEXTURES]; //Or better still, make the texturelist totally dynamic.



Google is probably your best friend - for now at least!

Cheers again!
"Game Maker For Life, probably never professional thou." =)

This topic is closed to new replies.

Advertisement