mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-06 00:36:10 +08:00
Another attempt at fixing the macOS OpenGL bug
This commit is contained in:
parent
9b2ca263d3
commit
0b7567ed06
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user