PDA

View Full Version : OpenGL Error in Debug Mode (VC++ 7, XP)



jojo
02-23-2003, 01:01 AM
Hi,
i've written an application with "OpenGL-views" in VC++ 6. Everything
is ok. If i try to run that program in the debug mode of VC++ 7, an
error message occurs: handle not valid ( at the function:
wglDeleteContext). There are no problems in the release mode. This
error occurs also in the OpenGL examples of www.codeguru.com (http://www.codeguru.com) and www.codeproject.com (http://www.codeproject.com) and the MSDN CUBE-example.
Where is the problem ?
Thanks

mikael_aronsson
02-23-2003, 03:23 AM
Hi !

Check your code, you get this type of errors in debug mode, in release mode it's ignored, that's why you think it works, it doesn't, you just don't get any error messages.

Check that you don't try to delete it two times or something like that.

Mikael

jojo
02-23-2003, 04:50 AM
Hi Mikael,
thanks for your answer. I agree, it is possible, that this type of error is ingored in release mode. But this error message doesn't occur in VC++ 6 (Win98) in the debug mode. If i try to delete it two times, it has to occur there too. Do you agree ?

mikael_aronsson
02-24-2003, 01:29 AM
Hi !

Yes, try to set the handle to NULL when you have deleted it (does not help, but it's a good way to find errors), check the handle so that it isn't NULL before you try to delete it to see if that's the problem, I guess it's not as you are using it in your code, sorry I have no better idea.

Mikael