Sign in to follow this  

Problem with colors in fullscreen

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

This topic is 4811 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this