Skip to main content
GameDev.net gamedev.net
🔒 Locked

Saving a simulation

Started by Mystery Feb 18, 2005 at 11:37 PM 1 replies 700+ views
Original Post
Mystery
Mystery
Is it possible to save a simulation in OPENGL? It will just for presentation purposes thus do not need the entire program. Also no user input required. Just a simple simulation. Pls advise. Thank you.
qazlop
qazlop
no. opengl is only a rendering api. You need to be clearer on what you are trying to do.

If you want to save the frames of animations to be viewed using a media player, go get fraps. you could also code this yourself since i assume you have the code to the simulation you are trying to save. You can simply timestep the simulation so that it does not care how long each frame tales to render, and use glreadpixels to read the display buffer. you take this frame and use video for windows (if on windows) to compress the frames into a movie file. you can also compress the sound using video for windows (vfw). You coudl also look into directshow for this. teh easiest would be to just write the images as bmps, pngs, or jpegs and use some other software to put the frames together (i think virtualdub can do this).
Deranged
Deranged
glSavetoAVI(); of course, but seriously, no OpenGL(Graphics Library) if you want those features look up mpeg lib and oter similar ones.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.