Jump to content
  • Advertisement
Sign in to follow this  
copacabana

Problem with colors in fullscreen

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

Hello! I'm using Visual Studio.Net Visual C++ and Windows XP SP2. I've first rewritten, next copied and finally downloaded the code given in the NeHe tutorial lesson 3 and in window mode everything is as it supposed to be, however in fullscreen mode colors "gone mad"! To be precise red color is gone and the whole scene looks darker. I do not know if there is a problem with drivers of video card ATI Radeon 8500 or is there some other reason. Has anyone encountered this or similar problem?? If so do you know any explanation why this is happening?? Thank you in advance for help.. Screenshots how it changes: rwrzesniewski.strony.wi.ps.pl/full.jpg rwrzesniewski.strony.wi.ps.pl/wind.jpg

Share this post


Link to post
Share on other sites
Advertisement
This problem occurs because the pixel format hasn't been specified correctly.
Make sure you zero the memory of the pixel format descritor, then make sure each value is correct. The colour depth the same as the window colour depth (this will likly be the problem), the z-depth 24 or 16, no aux buffers, etc. You will find the rendering is being done with the microsoft reference opengl rasterizer (software ;)

this is code to test if the pixel format is supported in hardware or not:



...

unsigned int PixelFormatID= ChoosePixelFormat(wnd->hDC, &pixelFormat);

DescribePixelFormat(wnd->hDC,PixelFormatID,pixelFormat.nSize,&pixelFormat);

if (pixelFormat.dwFlags & PFD_GENERIC_FORMAT)
{
// software...
}

...


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!