Jump to content
  • Advertisement
Sign in to follow this  
Alexander311

Help! Weird color problems with direct draw

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

I am working in a 640 by 480 8bit color mode with DirectX and simple 2-dimensional drawing. I use a 256 color palette. I have encountered a weird problem that I think is caused by Windows Xp incompatibility. When I run direct draw code that involves the Flip() function, sometimes all the colors displayed get changed. So all the bitmaps and bobs are displayed, but the colors are not what they are supposed to be. This happens at the start of the program and continues unless I re-initialize direct draw. This occurs only some of the time, so most of the time the program runs fine. But sometimes, I turn it on and the colors are messed up. Also, I have noticed that when I access a bitmap or something and then run my game, this weird color changing effect has a much higher chance of occuring. I even tried not drawing any bitmaps and just having a black screen (fill the back_buffer with black). Still, the problem occurs. I get a light blue screen instead of black. I am running this code on a Windows XP machine. When I ran the same code on Windows 98 (before upgrading my machine to XP), this never occurred. I tried this executable on another Windows Xp machine and the problem still occured. Also, this doesn't happen for just my code. I tried Andre Lamothe's code (the alien prog11_6.cpp). My machine runs the executable provided on the Dummies CD fine. However, after I compile and link the code on my machine... the resulting executable has the weird colors problem. Thus, I think that creating Directx executables on a WindowsXP machine causes this strange problem to occur. Has anyone else encountered this problem? I upgraded to the latest DirectX SDK and the thing persists. What might be causing this? Thanks, Alex

Share this post


Link to post
Share on other sites
Advertisement
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!