Files
rk_pve/pyui/video.py

30 lines
1.4 KiB
Python
Raw Normal View History

2025-10-10 05:47:12 +02:00
# People's Video Editor: high quality, GPU accelerated mp4 editor
# Copyright (C) 2025 Roz K <roz@rozk.net>
#
# This file is part of People's Video Editor.
#
# People's Video Editor is free software: you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# People's Video Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with People's Video Editor.
# If not, see <https://www.gnu.org/licenses/>.
2025-10-12 03:01:18 +02:00
import wx
import wx.glcanvas
2025-10-10 05:47:12 +02:00
2025-10-12 03:01:18 +02:00
class VideoCanvas(wx.glcanvas.GLCanvas):
__slots__ = 'context'
2025-10-12 04:11:18 +02:00
def __init__(self, parent, id, pos, size, style):
2025-10-12 03:01:18 +02:00
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())
2025-10-18 05:47:01 +02:00
if not self.context.IsOK()):
raise RuntimeError("Failed to create GL Context")