PDA

View Full Version : wglDeleteContext - int 3 exception breakpoint



slammo
05-05-2004, 04:19 AM
Greetings,

My OpenGL application doesn't close properly. When I close the program, I get a message box pops up that says "User breakpoint called from code at 0x77f75a58". After I click "ok", the program is at a breakpoint that in assembly code is

77F75A58 int 3

This happens when I call wglDeleteContext. The code in my destructor is:

wglMakeCurrent(hdc, NULL);
wglDeleteContext(hrc); // Problem

I've checked the values of hdc and hrc and they look valid. Any thoughts?

Thanks,
Slammo

plasmonster
05-05-2004, 04:34 AM
Try changing the make current call to this:
wglMakeCurrent( 0, 0 );

slammo
05-05-2004, 04:36 AM
Thanks for the quick reply, Portal!

Hmmm, I tried your suggestion -- same problem. Since the code looks good to me, I thought maybe it was a driver issue. So I downloaded the latest drivers for my video card and voila, it works fine!

Best,
Slammo