Saving a simulation
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.
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).
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).
glSavetoAVI(); of course, but seriously, no OpenGL(Graphics Library) if you want those features look up mpeg lib and oter similar ones.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement