Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

GLUT/OpenGL question

Options
  • 13-01-2010 6:55am
    #1
    Closed Accounts Posts: 267 ✭✭


    Hi,
    I have a quick question about GLUT/OpenGL if anyone can help.

    I have two different screens for a game I'm making (the game screen and a win screen). Both of them have been tested and work fine on their own, but I'm trying to change between them and all I get is a black screen:
    void Squares::DisplayGameScreen() {
        glutReshapeFunc(gameScreen->reshapeWrapper);
        glutKeyboardFunc(gameScreen->keyboardWrapper);
        glutDisplayFunc(gameScreen->displayWrapper);
    }
    
    void Squares::DisplayWinScreen() {
        glutReshapeFunc(winScreen->reshapeWrapper);
        glutKeyboardFunc(winScreen->keyboardWrapper);
        glutDisplayFunc(winScreen->displayWrapper);
        glutIdleFunc(winScreen->idleWrapper);
    }
    

    Is there a correct way to change the display function?

    Thanks


Comments

  • Registered Users Posts: 981 ✭✭✭fasty


    The documentation for GLUT says you are doing it right. You could put a breakpoint inside the displayWrapper function to see if GLUT at least calls it correctly.


Advertisement