PDA

View Full Version : Game mode need help



t3jem
03-26-2005, 11:20 AM
Hi I have seen multiple instances of the game mode on various sites but they weren't much help. Does anybody know of a good site that has a tutorial on the game mode in openGL or could someone post an example with the syntax? :confused:

t3jem
03-26-2005, 12:05 PM
Ok sry I found a site but when I enter the gamemode I get a quick glance at my game then it gives me an error saying "redisplay needed for window 1, but no display callback"

here is my code where I enter the game mode. can someone help?

glutInit(&argc, argv);
glutInitWindowSize(550, 500);
glutInitWindowPosition(50, 30);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH|GLUT_RG B);
glutCreateWindow("John's ping pong");
glutGameModeString( "1024x768:16@60" );
glutEnterGameMode();
init();
glutDisplayFunc(finished);
glutMouseFunc(mouse);
glutKeyboardFunc(keys);
glutKeyboardUpFunc(ukeys);
glutSpecialFunc(skeys);
glutSpecialUpFunc(sukeys);
glutIdleFunc(moving);
glutMainLoop();

Rob The Bloke
03-27-2005, 01:46 AM
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH|GLUT_RG B);
glutGameModeString( "1024x768:16@60" );
glutEnterGameMode();
init();
glutDisplayFunc(finished);
glutMouseFunc(mouse);
glutKeyboardFunc(keys);
glutKeyboardUpFunc(ukeys);
glutSpecialFunc(skeys);
glutSpecialUpFunc(sukeys);
glutIdleFunc(moving);
glutMainLoop();

t3jem
03-27-2005, 10:12 AM
Great! thanks. :)