This commit is contained in:
2025-10-12 04:11:18 +02:00
parent d8ff18387f
commit e803956d75
7 changed files with 47 additions and 38 deletions

View File

@ -20,13 +20,8 @@ import wx.glcanvas
class VideoCanvas(wx.glcanvas.GLCanvas):
__slots__ = 'context'
def __init__(self, parent,
id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.TAB_TRAVERSAL):
def __init__(self, parent, id, pos, size, style):
wx.glcanvas.GLCanvas.__init__(self, parent, id = id, pos = pos, size = size, style = style, attribList =
wx.glcanvas.GLAttributes().PlatformDefaults().RGBA().FrameBuffersRGB().DoubleBuffer().EndList())
self.context = wx.glcanvas.GLContext(self, ctxAttrs =
wx.glcanvas.GLContextAttrs().CoreProfile().OGLVersion(4,6).EndList())
def initialize(self):
self.SetCurrent(self.context)
self.SwapBuffers()