I’ve got pbuffers run several times without any problems under VC6, under any compile setting, there must be a problem with your code I guess…
Would you mind giving further details on how you’re actually using pbuffers?
Mopst likely you’re relying on an uninitialised variable being zero. When running in debug mode, allocated memory tends to be cleared to zero, which obviously doesn’t happen in release. But it is really impossible for us to debug your code for you. Put lots of assert(!glGetError()) among your gl calls and step through the code in a debugger.
harsman is most likely correct, though just relying on assert( !glGetError() ) might miss what is actually causing the problem. It is most likely an uninitialised variable, but it might not be something you use in GL (it might be a string or a pointer or anything really). In Project settings, set the warning level to Level 4 and the compiler might tell you where this is happening.
I tried a lot. I checked on OpenGL Errors, but there
aren’t any. I checked if PBuffers are valid too, but the Programm crashed on first Time Initialisation.
I found that it crushed in a call to wglChoosePixelFormatARB.
These are the parameters to wglChoosePixelFormat. The entries are the same in Debug and Release mode
I tried to compile with Warning Level 4 in Release mode, bute there are a lot of Warnings from Windows Header. There are also a lot Warnings from glprocs.h, which i use to Access the Extensions. I’ve got this from the GLSDK.
The glprocs Warnings are like this:
glprocs.c(522) : warning C4054: ‘type cast’ : From functionpointer ‘int (__stdcall *)()’ to ‘void *’
Eh sorry about my shortcut with
iAttrib[20-31] = 0
That means:
iAttrib[20] = 0; iAttrib[21]=0 and so on! I wouldn’t
write that down.
The only reason, that these Fields are set are Modularity of the code, because I can set some
of the fields I need.
I will check the DC again. I think that I validate it. If I found my mistake I will post it.
I found the Problem. I use exeption Handling to
catch invalid Context of Variables. if a Variable
is invalid I throw an error and catch it at
the End of the Function.
I’am not sure why, but if I do that the Programm
runs only in Debug mode.
I remove the try … catch block and write
the Messages with cerr directly.
Now everything works fine. Thanks a lot for your help again