made SetCurrent() and SwapBuffers() return boolean status indicator instead of void (slightly modified patch 1844090)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -200,12 +200,14 @@ wxGLContext::~wxGLContext()
|
||||
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;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -313,10 +315,14 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
||||
// operations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxGLCanvas::SwapBuffers()
|
||||
bool wxGLCanvas::SwapBuffers()
|
||||
{
|
||||
if ( !::SwapBuffers(m_hDC) )
|
||||
{
|
||||
return false;
|
||||
wxLogLastError(_T("SwapBuffers"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user