1
\$\begingroup\$

I'm a noob to the game dev world and recently finished the 2D XNA tutorial from http://www.pluralsight.com.

Everything was perfect until I decided to try the game in Fullscreen mode. The following code was added to the Game1 constructor.

        graphics.PreferredBackBufferWidth = 800;
        graphics.PreferredBackBufferHeight = 480;
        graphics.IsFullScreen = true;

As soon as it launched in Fullscreen, I noticed that the entire game was tinted. None of the colours were appearing as they should. That code was removed, the game then launched in the 800x480 window, however the tint remained.

I commented out all my Draw code so that all that was left was

        GraphicsDevice.Clear(Color.CornflowerBlue);

        //spriteBatch.Begin();
        //gameState.Draw(spriteBatch, false);
        //spriteBatch.End();

        //spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive);
        //gameState.Draw(spriteBatch, true);
        //spriteBatch.End();

        base.Draw(gameTime);

The result was an empty window that was tinted Purple, not Blue. I changed the GraphicsDevice.Clear colour to Color.White and the window was tinted Pink. Color.Transparent gave a Black window.

Even tried rebooting my PC but the 'tint' still remains. I'm at a loss here.

\$\endgroup\$
2
  • \$\begingroup\$ Do you have the same problem with other games? It sounds like a driver issue - some kind of global colour correction? \$\endgroup\$ Nov 11, 2012 at 12:15
  • \$\begingroup\$ Fixed it... Or should I say, got it to work. I created a new XNA project and when launched, the screen was Cornflower Blue. Re-opened the other game and it was still tinted. I then copied all my content and code files into the new project and voilà. \$\endgroup\$
    – D. Dubya
    Nov 11, 2012 at 13:46

3 Answers 3

3
\$\begingroup\$

I encountered the exact same issue, and solved it by disabling nvidia 3D stereoscopic.

\$\endgroup\$
1
  • \$\begingroup\$ Interesting... I'll give it a shot when I get home... \$\endgroup\$
    – D. Dubya
    Feb 1, 2013 at 15:06
0
\$\begingroup\$

Created a new XNA project and copied all code and content files to the new project. Colours are perfect once again.


Now check this out:

I added the fullscreen code back to the Game1 constructor in the new project:

    graphics.PreferredBackBufferWidth = 800;
    graphics.PreferredBackBufferHeight = 480;
    graphics.IsFullScreen = true;

Game launched in fullscreen, colours were tinted again. However, this time, after switching back to windowed mode, colours are fine.

Then changed to my monitor's native resolution:

    graphics.PreferredBackBufferWidth = 1680;
    graphics.PreferredBackBufferHeight = 1050;
    graphics.IsFullScreen = true;

Game launched in fullscreen, colours were tinted again and remained tinted when I switched back to windowed mode.

Gotta copy them to another new project now.

Weird...

\$\endgroup\$
2
  • \$\begingroup\$ Are you doing anything with your gamma settings during startup? \$\endgroup\$ Nov 11, 2012 at 17:05
  • \$\begingroup\$ @mh01: No sir... Not intentionally anyways. By 'during startup' are you referring to the constructor or Initialize fns? \$\endgroup\$
    – D. Dubya
    Nov 11, 2012 at 18:50
0
\$\begingroup\$

The reason might be the way in which the Content Pipeline works. It compiles the various content into xnb files, then loads these back again when you run the game. I think some of these xnb files are caching and arent being recreated when you switch screenmodes.

Try this to see if it helps: go into the Debug/bin or Release/bin folders in your project folder depending on your build configuration, and delete any files. Build and Run again, see if it solves the problem.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .