From 0b7567ed062d78c3d6fbd1c6384d1d9b27b646ac Mon Sep 17 00:00:00 2001 From: Daid Date: Fri, 9 Mar 2012 16:39:45 +0100 Subject: [PATCH] Another attempt at fixing the macOS OpenGL bug --- SkeinPyPy_NewUI/newui/preview3d.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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() -- 2.30.2