From: Daid Date: Fri, 9 Mar 2012 15:39:45 +0000 (+0100) Subject: Another attempt at fixing the macOS OpenGL bug X-Git-Tag: RC1~117 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0b7567ed062d78c3d6fbd1c6384d1d9b27b646ac;p=cura.git Another attempt at fixing the macOS OpenGL bug --- diff --git a/SkeinPyPy_NewUI/newui/preview3d.py b/SkeinPyPy_NewUI/newui/preview3d.py index 9bb7ec5c..a30194a7 100644 --- a/SkeinPyPy_NewUI/newui/preview3d.py +++ b/SkeinPyPy_NewUI/newui/preview3d.py @@ -199,9 +199,10 @@ class previewPanel(wx.Panel): class PreviewGLCanvas(glcanvas.GLCanvas): def __init__(self, parent): - attribList = None#(glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 24, glcanvas.WX_GL_STENCIL_SIZE, 8) + attribList = (glcanvas.WX_GL_RGBA, glcanvas.WX_GL_DOUBLEBUFFER, glcanvas.WX_GL_DEPTH_SIZE, 24, glcanvas.WX_GL_STENCIL_SIZE, 8) glcanvas.GLCanvas.__init__(self, parent, attribList = attribList) self.parent = parent + self.context = glcanvas.GLContext(self) wx.EVT_PAINT(self, self.OnPaint) wx.EVT_SIZE(self, self.OnSize) wx.EVT_ERASE_BACKGROUND(self, self.OnEraseBackground) @@ -258,7 +259,7 @@ class PreviewGLCanvas(glcanvas.GLCanvas): dc.Clear() dc.DrawText("No PyOpenGL installation found.\nNo preview window available.", 10, 10) return - self.SetCurrent() + self.SetCurrent(self.context) self.InitGL() self.OnDraw() self.SwapBuffers()