struct GLContext::Private
{
- ContextHandle context;
+ ContextHandle context = nullptr;
};
SetPixelFormat(dc, pf_index, &pfd);
priv = new Private;
- if(opts.forward_compatible || opts.gl_version_major!=DEFAULT_VERSION)
+ if(opts.forward_compatible || opts.gl_version_major!=GLOptions::DEFAULT_VERSION)
{
ContextHandle fake_context = wglCreateContext(dc);
wglMakeCurrent(dc, fake_context);
if(!priv->context)
throw unsupported_gl_mode(opts);
- wglMakeCurrent(0, 0);
+ wglMakeCurrent(nullptr, nullptr);
wglDeleteContext(fake_context);
}
else
GLContext::~GLContext()
{
- wglMakeCurrent(0, 0);
+ wglMakeCurrent(nullptr, nullptr);
wglDeleteContext(priv->context);
delete priv;