Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

GLUT/OpenGL question

  • 13-01-2010 06: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