Results 1 to 5 of 5

Thread: glutEnterGameMode

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2002
    Location
    Gunnison, CO, USA
    Posts
    22

    glutEnterGameMode

    so i just tried this entergame mode out, but my image does not show up, i just get a blank black screen. Is there something im forgetting to declare or call?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: glutEnterGameMode

    And how are we supposed to know what you forgot to do, if you don't tell us WHAT you do? There can be a few houndred things that can cause the image not to appear on the screen. That includes silly things like not calling glutMainLoop, drawing it outside the screen, drawing the image in a completely black color on a black background, or not drawing the image at all. If you don't provide us with any details, we can't even guess what's wrong.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2002
    Location
    Gunnison, CO, USA
    Posts
    22

    Re: glutEnterGameMode

    sorry, my bad, my program runs fine with glutcreatwindow(). I simply replace creatwindow with enter gamemode, Here:

    int main(int argc, char **argv)
    {
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
    glutInitWindowSize(800,800);
    //glutCreateWindow("Ball");
    glutEnterGameMode();
    glutDisplayFunc(display);
    glutKeyboardFunc(keyboard);
    glutSpecialFunc(arrows);
    init();
    glEnable(GL_DEPTH_TEST);
    glutMainLoop();
    return 0;
    }

    I have my lookat setup in my display, it works fine when the creatwindow is enableed, i dont believe that is the problem.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    352

    Re: glutEnterGameMode

    You forgot calling glutGameModeString. Example :
    glutInit (&argc, argv);
    glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
    glutGameModeString("1024x768:32");
    if (glutGameModeGet (GLUT_GAME_MODE_POSSIBLE)) {
    glutEnterGameMode();
    }

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2002
    Location
    Gunnison, CO, USA
    Posts
    22

    Re: glutEnterGameMode

    Hey thanx, that did the trick. I appreciate it tons.

Similar Threads

  1. Problems with glutEnterGameMode
    By H.Stony in forum OpenGL: macOS
    Replies: 2
    Last Post: 10-09-2004, 02:03 AM
  2. glutEnterGameMode
    By scriptlord in forum OpenGL: Linux
    Replies: 1
    Last Post: 06-17-2002, 04:36 PM
  3. GlutEnterGameMode();
    By scriptlord in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 06-04-2002, 09:39 AM
  4. glutEnterGameMode()
    By mist350 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 08-29-2001, 07:07 PM
  5. exiting glutEnterGameMode crashes some PCs?
    By BlueJ in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-06-2001, 10:47 AM

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