Jump to content
  • Advertisement

Archived

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

nickwinters

Mysterious White Background...

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

device.Clear(ClearFlags.Target | ClearFlags.ZBuffer , Color.Blue, 1.0f, 0); 
I''m using the above code. Sometimes a white square appears and covers everything. We also sometimes have white lines. Anyone know what causes these? Thanks. -Nick

Share this post


Link to post
Share on other sites
Advertisement
The only thing that comes to mind is that if Windows thinks an app isn''t responding it will white out the display. Maybe your Windows messages aren''t being dealt with properly?

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Yeah, WindowsXP will automatically blank out a window with its background color (usually white by default) if it determines messages aren''t being processed.

I like pie.

Share this post


Link to post
Share on other sites
It''s still taking in input, and drawing the unit you control, although it is somewhat flickering. I can close it with alt+f4 without any error messages.

Share this post


Link to post
Share on other sites
Is your input coming from DirectInput or windows messages? DirectInput will work even if windows messages are piling up.

I''m assuming you''re using .Net. Are you doing the wacky OnPaint trick?

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
I''ve never seen the advantage in the OnPaint method and it''s always struck me as a hack.

There are some additional things you have to set up with it. I''d have to check my notes though and they''re at home.

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
I thought there was more, but all I could find was that you need to set the style of your window like so:

this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque,true);

Interestingly the .Net docs warn against doing this, but it''s required with the OnPaint hack.

Stay Casual,

Ken
Drunken Hyena

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!