wglDeleteContext(m_glContext);
}
-void wxGLContext::SetCurrent(const wxGLCanvas& win) const
+bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
{
if ( !wglMakeCurrent(win.GetHDC(), m_glContext) )
{
wxLogLastError(_T("wglMakeCurrent"));
+ return false;
}
+ return true;
}
// ============================================================================
// operations
// ----------------------------------------------------------------------------
-void wxGLCanvas::SwapBuffers()
+bool wxGLCanvas::SwapBuffers()
{
if ( !::SwapBuffers(m_hDC) )
+ {
+ return false;
wxLogLastError(_T("SwapBuffers"));
+ }
+ return true;
}
// ----------------------------------------------------------------------------