Jump to content
  • Advertisement

Archived

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

Ructions

Splash Screen

This topic is 5217 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

When i start up my game the window is grayed out until everything is loader like all my textures. So i want to make a splash screen to stay up for a certain amount of time and then the main window to start up. so i was wondering how could this be done. Using NeHe OO Basecode and using VC++ Any help be greatful thanks ructions

Share this post


Link to post
Share on other sites
Advertisement
This is much easier than you are thinking...

In your init program load your splashscreen texture, enable textures,switch to ortho mode, and draw the quad, and swap the buffer. Then load all the rest of the textures, models, etc while the loading screen is up.

Share this post


Link to post
Share on other sites
Ok here is some code:



CreateTextureTGA(g_Texture, "Image/loading.tga", 8, g_hWnd, 0); //8

glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,textureMan.texture[T_LOADSCREEN]);
ViewOrtho(SCREEN_HEIGHT,SCREEN_WIDTH);
glBegin(GL_QUADS);
// Display the top left point of the 2D image

glTexCoord2f(0.0f, 1.0f); glVertex2f(0, 0);

// Display the bottom left point of the 2D image

glTexCoord2f(0.0f, 0.0f); glVertex2f(0, SCREEN_HEIGHT);

// Display the bottom right point of the 2D image

glTexCoord2f(1.0f, 0.0f); glVertex2f(SCREEN_WIDTH, SCREEN_HEIGHT);

// Display the top right point of the 2D image

glTexCoord2f(1.0f, 1.0f); glVertex2f(SCREEN_WIDTH, 0);

// Stop drawing

glEnd();
ViewPerspective();
SwapBuffers(g_hDC);




[edited by - skow on April 3, 2004 3:20:36 PM]

Share this post


Link to post
Share on other sites
I still dont understand i really dont understand all that Ortoview, Prespective stuff.

If you could explain it more it would be helpful.
thanks in advance
ructions

Share this post


Link to post
Share on other sites
Take a look at the tutorial at http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg2.htm on orth mode.

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!