   WinXP SP2
  I have written a C++ MFC application with some OpenGL rendering which used to work fine. But after installing Windows XP Service Pack 2, the rendering no longer works. Drawing of fonts and other 2d elements still works, but all my 3D stuff has ceased to function. What is strange is that it works in Debug mode, but as soon as i compile in release mode it doesn't work anymore (i've narrowed it down to being caused by the _DEBUG pre-processor definition, i.e. it works when _DEBUG is defined, otherwise it doesn't).Has anybody encountered any similar issues? If so please let me know, I need help! Psychological help if this is not solved soon :)Thanks,SpaceDude   
  So my first response on seeing a change in functionality with the debug flag changing is to look at your asserts. Any code in an assert will be removed when the debug flag is removed so you want to make sure nothing important is done in an assert.Now since it was working before you added sp2 it would have to be something pretty subtle for that to be the problem, but it's still a good first place to look. Here are some resources on debugging release mode problems:http://www.codeproject.com/debug/releasemode.asphttp://www.codeproject.com/debug/survivereleasever.asphttp://www.flounder.com/debug_release.htmYou can also tackle it from the other direction and look for an opengl issue. Make sure you are getting a valid rendering context. Check if your pixel format calls are giving errors. Check that the pixel format you are using is valid. Check for glErrors. Try to do some really basic things with your rendering context, like glGetString on the various strings. If you can't even get those you know your rendering context is bad. Are you using other wgl extensions, like pbuffers? If you are, try turning them off. ;  Thank you for the response.I have looked at my asserts in the past, to make sure that no important code has been executed in them. So I'm pretty sure the problem doesn't lie there.I have had problems in the past with debug vs release mode. And again I fixed them. I think the problem is with the OpenGL specifically. Because the program works as it should, everything is fine except for the rendering.I think my rendering context is fine... As I said, the text is rendering correctly and the stuff that I render in 2D is fine too. I am using some wgl extensions, not pbuffers though. These are the wgl extensions i use:wglCreateContextwglDeleteContextwglMakeCurrentwglUseFontBitmapsIts a fairly large program I have written, more than 30 000 lines so I was wondering if anybody else has similar problem before going through the code trying to figure out the source of the problem.Quote:Original post by SoliasSo my first response on seeing a change in functionality with the debug flag changing is to look at your asserts. Any code in an assert will be removed when the debug flag is removed so you want to make sure nothing important is done in an assert.Now since it was working before you added sp2 it would have to be something pretty subtle for that to be the problem, but it's still a good first place to look. Here are some resources on debugging release mode problems:http://www.codeproject.com/debug/releasemode.asphttp://www.codeproject.com/debug/survivereleasever.asphttp://www.flounder.com/debug_release.htmYou can also tackle it from the other direction and look for an opengl issue. Make sure you are getting a valid rendering context. Check if your pixel format calls are giving errors. Check that the pixel format you are using is valid. Check for glErrors. Try to do some really basic things with your rendering context, like glGetString on the various strings. If you can't even get those you know your rendering context is bad. Are you using other wgl extensions, like pbuffers? If you are, try turning them off.