Jump to content
  • Advertisement
Sign in to follow this  
species8472

Weird colors on Clear()

This topic is 4901 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 , In my game , i display a loading screen between levels . The loading screen is basically an animated gif on a screen cleared to 0,0,0 (black). Ive noticed that when the loading screen is up weird colors flash across the screen - this does not happen when a level is active. I've read somewhere that DX will fill vram with garbage values in debug mode. I've built my code in release mode and still notice this behaviour ... is it cos my DX runtime is still the debug version ?? Or is this another problem. ? Thanks

Share this post


Link to post
Share on other sites
Advertisement
The Debug Runtime of Direct3D will fill the back buffer alternately with 0x00FF00FF and 0x0000FF00 when you call Present() I believe, but it might be on a Clear() to black.

It doesn't matter whether your code is in debug or release.

Share this post


Link to post
Share on other sites
Quote:
Original post by species8472
So this will not happen in the retail version of DX ?

Probably not, however - being the debug runtime it's telling you something is wrong. If you can, you're best off fixing it..

I've had the green/pink alternating screens due to bugs before - when I deployed it (having not fixed it), people emailed me back saying they got all sorts of random stuff briefly appearing - copies of the windows desktop, "noise", distorted parts of textures..

On the other side of things - it isn't (that I know of) a fatal error. Your application should carry on just fine so it's more of a presentability problem if anything.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by Lee_
it sounds like you're not including the D3DCLEAR_TARGET flag.

It can also occur if you change the D3DPRESENT_PARAMETERS structure used when you create a device. It can affect the way the hw/driver deals with a frame buffer when its done with it, which, if combined with odd D3DCLEAR_TARGET usage can cause problems.

I'm at work right now and a bit busy to check the specifics of it - but the field in that struct thats got _DISCARD, _SWAP etc...

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
any idea of wot type of issues we're talking abt ???

The one I described about the pink/green alternating in debug but giving random garbage for retail is the best example I suppose.

At least for a commercial quality game, its a warning that you're doing something that might look a bit rubbish when your paying customer plays it.

Maybe it won't be a problem - but you can bet that in a serious case where you got lots of garbage appearing between the odd frame it's gonna look bad.

Another, different example, is that you can end up relying on default/undefined values/settings - the debug runtime will explicitly show you this by trying to break your program. The retail runtimes and drivers won't necessarily do this - but it could be the cause of some interesting bugs people will probably blame your software for!

If I were you, get the DX control panel and ramp up the debug output to maximum - see if/what it tells you. Usually its quite helpful!

Cheers,
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!