Пример #1
0
    def __init__(self, wid, window_alpha):
        self.wid = wid
        self.size = 0, 0
        self.render_size = 0, 0
        self.texture_pixel_format = None
        #this is the pixel format we are currently updating the fbo with
        #can be: "YUV420P", "YUV422P", "YUV444P", "GBRP" or None when not initialized yet.
        self.pixel_format = None
        self.textures = None # OpenGL texture IDs
        self.shaders = None
        self.texture_size = 0, 0
        self.gl_setup = False
        self.debug_setup = False
        self.border = None
        self.paint_screen = False
        self.paint_spinner = False
        self.draw_needs_refresh = False
        self.offscreen_fbo = None
        self.pending_fbo_paint = []

        GTKWindowBacking.__init__(self, wid, window_alpha)
        self.init_gl_config(window_alpha)
        self.init_backing()
        #this is how many bpp we keep in the texture
        #(pixels are always stored in 32bpp - but this makes it clearer when we do/don't support alpha)
        if self._alpha_enabled:
            self.texture_pixel_format = GL_RGBA
        else:
            self.texture_pixel_format = GL_RGB
        self._backing.show()
Пример #2
0
    def __init__(self, wid, window_alpha):
        self.wid = wid
        self.size = 0, 0
        self.render_size = 0, 0
        self.texture_pixel_format = None
        #this is the pixel format we are currently updating the fbo with
        #can be: "YUV420P", "YUV422P", "YUV444P", "GBRP" or None when not initialized yet.
        self.pixel_format = None
        self.textures = None # OpenGL texture IDs
        self.shaders = None
        self.texture_size = 0, 0
        self.gl_setup = False
        self.debug_setup = False
        self.border = None
        self.paint_screen = False
        self.paint_spinner = False
        self.offscreen_fbo = None
        self.tmp_fbo = None
        self.pending_fbo_paint = []
        self.last_flush = time.time()
        self.default_paint_box_line_width = OPENGL_PAINT_BOX or 1
        self.paint_box_line_width = OPENGL_PAINT_BOX

        GTKWindowBacking.__init__(self, wid, window_alpha)
        self.init_gl_config(window_alpha)
        self.init_backing()
        #this is how many bpp we keep in the texture
        #(pixels are always stored in 32bpp - but this makes it clearer when we do/don't support alpha)
        if self._alpha_enabled:
            self.texture_pixel_format = GL_RGBA
        else:
            self.texture_pixel_format = GL_RGB
        #see #1469
        #self.draw_needs_refresh = False
        self._backing.show()
Пример #3
0
 def __init__(self, wid, w, h, has_alpha, data=None):
     self.data = data
     GTKWindowBacking.__init__(self, wid, True)
     self._backing = object()    #pretend we have a backing structure
Пример #4
0
 def __init__(self, wid, w, h, has_alpha):
     GTKWindowBacking.__init__(self, wid)
     self._has_alpha = has_alpha and HAS_ALPHA
Пример #5
0
 def __init__(self, wid, w, h, has_alpha):
     GTKWindowBacking.__init__(self, wid)
     self._has_alpha = has_alpha and HAS_ALPHA
Пример #6
0
 def __init__(self, wid, w, h, has_alpha):
     self.pixels = None
     self.format = None
     GTKWindowBacking.__init__(self, wid)
Пример #7
0
 def __init__(self, wid, w, h, has_alpha):
     GTKWindowBacking.__init__(self, wid, has_alpha)
Пример #8
0
 def __init__(self, wid, w, h, has_alpha):
     GTKWindowBacking.__init__(self, wid)
Пример #9
0
 def __init__(self, wid, w, h, has_alpha):
     self.pixels = None
     self.format = None
     GTKWindowBacking.__init__(self, wid)
Пример #10
0
 def __init__(self, wid, w, h, has_alpha, data=None):
     self.data = data
     GTKWindowBacking.__init__(self, wid)