Sign in to follow this  

How can i put the animation in openGl?

This topic is 4170 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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..?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

This topic is 4170 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this