Results 1 to 4 of 4

Thread: Game mode need help

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2005
    Posts
    115

    Game mode need help

    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?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2005
    Posts
    115

    Re: Game mode need help

    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();

  3. #3
    Senior Member Regular Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    472

    Re: Game mode need help

    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();

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2005
    Posts
    115

    Re: Game mode need help

    Great! thanks.

Similar Threads

  1. Game Mode
    By Yvan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-12-2001, 12:40 PM
  2. To use the mode : Game Glut
    By Bahamut_france in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-06-2001, 04:23 AM
  3. Glut Game Mode?
    By pleopard in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 01-22-2001, 08:53 AM
  4. what is game mode?
    By slorac in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-13-2000, 11:07 PM
  5. Glut game mode
    By imported_Rob in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-22-2000, 09:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean