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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

GLUT/OpenGL question

  • 13-01-2010 5: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, Registered Users 2 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