I have a framework from a very simple OpenGL program, written the way I want for now from a software project structure perspective. However, I don’t know what’s the rendering rate of my program. I didn’t register any callback for glutTimerFunc(), so would it be safe to assume the rendering would refresh at the rate of the hardware (video card, display monitor, etc.)?
The reason that I’m asking this question is I would like to run a routine within a for loop or while loop like I used to before introducing OpenGL rendering routines into my project. In other words, after introducing the OpenGL GLUT related codes and after glutMainLoop function is called, I would still like to be able to execute the following in the background or just before rendering the points:
for(i = 0; i < until I want this loop to stop; i++)
{
myfunc(inputs, outputs);
// other actions I want here
// render the points
}
What would you suggest to do to ensure this happens with my logic? Is there a standard callback where I can call this generic function to calculate the outputs? Thanks.