Gandi Posted February 15, 2010 Share Posted February 15, 2010 Hey, I've run into some really weird problem while implementing a loading screen. Once you start the game, you see the main menu and when clicking on "start game" it displays the loading state with a green bar while it loads the scene and game specific data (what an incredibly creative idea^^) My main loop looks basically like this: (pseudo code) while (!AppTerminate()) { switch ( GameState ) { case MainMenu: DrawMainMenu(); break; case LoadingScreen: LoadNextPiece(); DrawLoadingScreen(); break; case Ingame: UpdateFramework(); RenderFramework(); } Flip(); } Note that during loading stage, I'm not rendering _anything_ except the loading screen, which consists of two images... but it magically blends it with the terrain viewed from the top... I'll show a few images so you can see what I mean: This is the loading screen before LoadScene() gets called, looks pretty normal (except for the ugly loading bar^^) --- This is the loading screen after LoadScene() got called. The terrain you can see is the terrain of the scene loaded. Although this happens to look quite funny, it's definately not what I wanted and I have no idea how to fix this. Any help would be appreciated Gandi Quote Link to comment Share on other sites More sharing options...
wh1sp3r Posted February 17, 2010 Share Posted February 17, 2010 looks like, you have to turn blending off or render HUD after rendering a lights Quote -= Phenom II X4 965 3.4Ghz - ATI HD5870 - 6 GB DDR3 RAM - Windows 8 Pro 64x=- Website: http://www.flamewarestudios.com Link to comment Share on other sites More sharing options...
Gandi Posted February 18, 2010 Author Share Posted February 18, 2010 Alphablending is off but it should not matter because i'm not rendering lights anyway. I just do: LoadScene() DrawImage( Loadingscreen ) Flip() Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted February 18, 2010 Share Posted February 18, 2010 Have you tried a different order? DrawImage( Loadingscreen ) Flip() LoadScene() Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Josh Posted February 18, 2010 Share Posted February 18, 2010 LoadScene() DrawImage( Loadingscreen ) Flip() Why would you expect anything to show up when the game is loading with that order of commands? It's probably just displaying whatever random bits are in the video buffer. DrawImage( Loadingscreen ) Flip() LoadScene() Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Gandi Posted February 19, 2010 Author Share Posted February 19, 2010 LoadScene() DrawImage( Loadingscreen ) Flip() Why would you expect anything to show up when the game is loading with that order of commands? It's probably just displaying whatever random bits are in the video buffer. DrawImage( Loadingscreen ) Flip() LoadScene() LoadScene() should be irrelevant, I draw the image on the back buffer, then I display the back buffer on the monitor using Flip() ... or am I missing something here? Quote Link to comment Share on other sites More sharing options...
Niosop Posted February 19, 2010 Share Posted February 19, 2010 He's just saying that by the time the DrawImage command is called the Scene has already been loaded. So while the scene is being loaded, nothing is being sent to the video card, so whatever happened to be in video memory is going to be displayed. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.