def do_configure_event(self, event): ClientWindow.do_configure_event(self, event) drawable = self.glarea.get_gl_drawable() context = self.glarea.get_gl_context() self.yuv420_shader = None # Re-create textures self.current_mode = GLClientWindow.MODE_UNINITIALIZED if not drawable.gl_begin(context): raise Exception("** Cannot create OpenGL rendering context!") w, h = self.get_size() log("Configure widget size: %d x %d" % (w, h)) glViewport(0, 0, w, h) glMatrixMode(GL_PROJECTION) glLoadIdentity() glOrtho(0.0, w, h, 0.0, -1.0, 1.0) glMatrixMode(GL_MODELVIEW) glEnableClientState(GL_VERTEX_ARRAY) glEnableClientState(GL_TEXTURE_COORD_ARRAY) glDisable(GL_FRAGMENT_PROGRAM_ARB) if self.textures is None: self.textures = glGenTextures(3) drawable.gl_end()
def __init__(self, client, group_leader, wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay): debug("GLClientWindow(..)") ClientWindow.__init__(self, client, group_leader, wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay) self.set_reallocate_redraws(True) self.add(self._backing.glarea)
def __init__(self, client, wid, x, y, w, h, metadata, override_redirect): ClientWindow.__init__(self, client, wid, x, y, w, h, metadata, override_redirect) display_mode = gtk.gdkgl.MODE_RGB | gtk.gdkgl.MODE_SINGLE self.glconfig = gtk.gdkgl.Config(mode=display_mode) self.glarea = gtk.gtkgl.DrawingArea(self.glconfig) self.glarea.set_size_request(w, h) self.glarea.show() self.add(self.glarea) self._on_close = [] self.textures = None # OpenGL texture IDs self.current_mode = GLClientWindow.MODE_UNINITIALIZED
def __init__(self, client, wid, x, y, w, h, metadata, override_redirect): ClientWindow.__init__(self, client, wid, x, y, w, h, metadata, override_redirect) display_mode = (gtk.gdkgl.MODE_RGB | gtk.gdkgl.MODE_SINGLE) self.glconfig = gtk.gdkgl.Config(mode=display_mode) self.glarea = gtk.gtkgl.DrawingArea(self.glconfig) self.glarea.set_size_request(w, h) self.glarea.show() self.add(self.glarea) self._on_close = [] self.textures = None # OpenGL texture IDs self.current_mode = GLClientWindow.MODE_UNINITIALIZED
def __init__(self, client, wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay): ClientWindow.__init__( self, client, wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay ) display_mode = gtk.gdkgl.MODE_RGB | gtk.gdkgl.MODE_SINGLE self.glconfig = gtk.gdkgl.Config(mode=display_mode) self.glarea = gtk.gtkgl.DrawingArea(self.glconfig) self.glarea.set_size_request(w, h) self.glarea.show() self.add(self.glarea) self._video_decoder = None self._video_decoder_codec = None self.textures = None # OpenGL texture IDs self.current_mode = GLClientWindow.MODE_UNINITIALIZED
def __init__(self, client, wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay): ClientWindow.__init__(self, client, wid, x, y, w, h, metadata, override_redirect, client_properties, auto_refresh_delay) display_mode = (gtk.gdkgl.MODE_RGB | gtk.gdkgl.MODE_SINGLE) self.glconfig = gtk.gdkgl.Config(mode=display_mode) self.glarea = gtk.gtkgl.DrawingArea(self.glconfig) self.glarea.set_size_request(w, h) self.glarea.show() self.add(self.glarea) self._video_decoder = None self._video_decoder_codec = None self.textures = None # OpenGL texture IDs self.current_mode = GLClientWindow.MODE_UNINITIALIZED
def destroy(self): self._backing.paint_screen = False ClientWindow.destroy(self)
def do_configure_event(self, event): debug("GL do_configure_event(%s)", event) ClientWindow.do_configure_event(self, event) self._backing.paint_screen = True