Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Splash Screen Issues with GLUT & OpenGL

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 muffinmannen   Members   


Posted 31 January 2013 - 03:04 PM

Hey all,


I'm trying to create a splash / welcome screen for a game I'm working on.  I had a look online and found some good info but I'm still unable to get it to work.


Ideally I'd like my main to run a function that would initially display the splash screen, after input it would then display the main menu and from there each screen as appropriate, high scores, levels of game etc.


I've tried that and then I've tried an uglier approach but I can't get the right results.  I'm pretty new to OpenGL & GLUT and not fantastic when it comes to C++.


Any help would be hugely appreciated.


Below is code that I'm using / trying to use. stripped of unnecessary 'stuff'


At the moment there's no response when pressing space.  I've tried mouse butting, glut special keys etc but still no joy.


If there's also a more efficient way of doing this then please shout! :D




glutInit(&argc, argv);









void screenSequence(){







void displaySplashScreen(){










void idleSplashScreen() {


    int button = 0;

    //if space is pressed...

    if ( button == 32) {









#2 webwraith   Members   


Posted 03 February 2013 - 01:03 PM

Just as a quick question, when you talk about splash screens, do you mean those that come up as a program is loading ( see everything from the latest games to MS Office for examples of this, although my personal favourite are the Adobe ones. ), or do you mean a Title screen, such as that would likely say "Press start to continue"? For the first, I'd use a simple native window which just loads and displays an image and/or some text. This shouldn't be too hard, and you can probably find some decent code for this with a quick Google search. For the title screen, then you should probably treat it like any other "screen" in your game, and use the GLUT methods for reading from the keyboard. If you're having troubles with this part, then let us know. I don't really have a great deal of experience with GLUT myself, but I'm sure someone can give you a hand


Well, that will teach me to read a post properly. I'm not sure why the code isn't working, unless it has to do with you setting button to 0, then checking if it is equal to 32 (I'm assuming you have GLUT code in there to retrieve the key values, but obviously I'm not sure). Other than that, I haven't seen anything in the documentation to suggest that you need to do things differently to how you already are. Unfortunately, that's about as far as my usefulness extends. Best of luck in finding the solution to this problem, and I hope you'll leave a post detailing how you did it if you do.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.