Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Splash Screens

This topic is 6307 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there! How do I make a splash screen to display before I switch to fullscreen OpenGL mode? I''ve found that creating a window and rc takes long enough to warrant a splash screen on my computer. Thanks in advance!

Share this post

Link to post
Share on other sites
Basically you''ll want to create a window that displays a single bitmap as soon as the program loads, then do all your application-specific initialization (loading models/textures and what have you), and when that is done destroy the splashscreen-window.
A short while ago I made a simple splashscreen for windows, which I just put on my former company''s server, and can be found at http://gothix.trans4media.com/docs/splashscreen.zip

It''s pretty simple to use. Simply call
bool CreateSplashScreen (HINSTANCE hInstance, const char* bitmap)
at the start of WinMain, and then DestroySplashScreen() when you are done with initialization of your own app. (You should make sure that your own WindowClass is created without the WS_VISIBLE flag to get the best result).

Feel free to do just about whatever you want with the source-code, although if you release anything based on it I would appreciate a mention somewhere (not necessary though)).


- Death awaits you all with nasty, big, pointy teeth. -

Share this post

Link to post
Share on other sites
Thanks Neophyte! Your code is excellent!

Where exactly do you recommend I call DestroySplashScreen()?

At the moment I''m doing this:


But the transition between windows and fullscreen isn''t particularly smooth. Can you recomend anything?

Thanks again for the spashscreen code - everyone should have that code!!!

Share this post

Link to post
Share on other sites
Glad to hear it was helpful.
Actually, one of the reasons that the transition is particularily smooth is that the Splashscreen is single-threaded. I played around with a multi-threaded version (the splashscreen in its own thread), which worked fine, but when I formatted my harddisk a while back I forgot to back that part up, and I haven''t been bothered to do it again.

Anyway, destroying the splashscreen just before changing the screen-resolution is probably the best idea. At least it should be called before you change the resolution, as the position of the splashscreen doesn''t change with the resolution (it is set once when the splashscreen is created).
I haven''t used it much with fullscreen apps myself, but I''ll experiment a little with it and send you a mail if I find something useful.


- Death awaits you all with nasty, big, pointy teeth. -

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!