wglDeleteContext - int 3 exception breakpoint

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

Try changing the make current call to this:
wglMakeCurrent( 0, 0 );

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

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.