0

Recently, I have been working on a 3D physics simulation using C++ and OpenGL/GLFW. In order to create a very accurate simulation I need to (among other things) make the timestep very small. The problem is that is makes the simulation run very slowly, so what I was thinking is stepping time several times (say twenty) and then rendering the result. The simulation is then more accurate, but there is a very low framerate. A solution would be to save each render as a frame of a video. Is there a way to do this built into GLFW or another library (without using something like nVidia Shadowplay and recording the window)?

paper man
  • 488
  • 5
  • 19

1 Answers1

0

A video is just a series of individual frames (possibly compressed in various ways to save space). So you could simply save each individual frame to disk (along with time information) and then subsequently transform those raw frames into a video format of your choice (tools exist for that).

As far as I know, there is no support for saving directly to a video format in glfw or similar (but I could be wrong).

Jesper Juhl
  • 30,449
  • 3
  • 47
  • 70