Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualShawn619

Posted 30 June 2013 - 05:33 PM

I'm not entirely sure what the frames per second is in my opengl game. My main() goes like this:

int main(int argc, char** argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(windowWidth, windowHeight);
glewInit();
GLenum err = glewInit();
if(GLEW_OK != err) {
cout << "glewInit error." << endl;
}
initRendering();
glutSetCursor(GLUT_CURSOR_NONE); 
glutDisplayFunc();
glutMouseFunc();
glutMotionFunc();
glutPassiveMotionFunc();
glutKeyboardFunc();
glutKeyboardUpFunc();
glutTimerFunc(FPS, update, 0);
glutMainLoop();
system("pause");
return 0;
}

So since if FPS=60, does that mean the fps is locked at 60 and never changes, except in the case lag?


#1Shawn619

Posted 30 June 2013 - 05:21 PM

I'm not entirely sure what the FPS is in my opengl game. My main() goes like this:

 

int main(int argc, char** argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize(windowWidth, windowHeight);
glewInit();
GLenum err = glewInit();
if(GLEW_OK != err) {
cout << "glewInit error." << endl;
}
initRendering();
glutSetCursor(GLUT_CURSOR_NONE); 
glutDisplayFunc();
glutMouseFunc();
glutMotionFunc();
glutPassiveMotionFunc();
glutKeyboardFunc();
glutKeyboardUpFunc();
glutTimerFunc(FPS, update, 0);
glutMainLoop();
system("pause");
return 0;
}

 

So since if FPS=60, does that mean the fps is locked at 60 and never changes, except in the case lag?


PARTNERS