X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4660d7e5d656bd63c6ba410e6bf36486e7a77d4e..b916f809336755620b010293637b12763f01455d:/src/mac/glcanvas.cpp diff --git a/src/mac/glcanvas.cpp b/src/mac/glcanvas.cpp index 1629d068b6..2ff4a89128 100644 --- a/src/mac/glcanvas.cpp +++ b/src/mac/glcanvas.cpp @@ -263,20 +263,32 @@ void wxGLCanvas::SetViewport() } void wxGLCanvas::OnSize(wxSizeEvent& event) +{ + MacUpdateView() ; +} + +void wxGLCanvas::MacUpdateView() { if (m_glContext) { UpdateContext(); m_glContext->SetCurrent(); - SetViewport(); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 ); - glMatrixMode(GL_MODELVIEW); } } +void wxGLCanvas::MacSuperChangedPosition() +{ + MacUpdateView() ; + wxWindow::MacSuperChangedPosition() ; +} + +void wxGLCanvas::MacTopLevelWindowChangedPosition() +{ + MacUpdateView() ; + wxWindow::MacTopLevelWindowChangedPosition() ; +} + void wxGLCanvas::SetCurrent() { if (m_glContext)