X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3bf4a6263417ff8ba29b529f5a076432ed6dbb8..d65c269b3f665e15a8ae1b8fff063b2ec0ef19a7:/src/mac/carbon/glcanvas.cpp?ds=inline diff --git a/src/mac/carbon/glcanvas.cpp b/src/mac/carbon/glcanvas.cpp index 8edf2fc38e..62d9c307c4 100644 --- a/src/mac/carbon/glcanvas.cpp +++ b/src/mac/carbon/glcanvas.cpp @@ -45,7 +45,7 @@ wxGLContext::wxGLContext( { m_window = win; - m_drawable = (AGLDrawable) UMAGetWindowPort(win->GetMacRootWindow()); + m_drawable = (AGLDrawable) UMAGetWindowPort(MAC_WXHWND(win->MacGetRootWindow())); m_glContext = aglCreateContext(fmt, other ? other->m_glContext : NULL); wxCHECK_RET( m_glContext, wxT("Couldn't create OpenGl context") ); @@ -216,7 +216,6 @@ bool wxGLCanvas::Create(wxWindow *parent, const wxGLContext *shared, wxWindowID const wxPoint& pos, const wxSize& size, long style, const wxString& name, int *attribList, const wxPalette& palette) { - m_macEraseOnRedraw = false ; wxWindow::Create( parent, id, pos, size, style, name ); AGLPixelFormat fmt = ChoosePixelFormat(attribList); @@ -252,7 +251,7 @@ void wxGLCanvas::SetViewport() int width, height; GetClientSize(& width, & height); Rect bounds ; - GetWindowPortBounds( GetMacRootWindow() , &bounds ) ; + GetWindowPortBounds( MAC_WXHWND(MacGetRootWindow()) , &bounds ) ; GLint parms[4] ; parms[0] = x ; parms[1] = bounds.bottom - bounds.top - ( y + height ) ; @@ -273,12 +272,7 @@ void wxGLCanvas::MacUpdateView() { 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); } }