Exemplo n.º 1
0
    def __init__(self, width, height, config = None, share_group = None, **kwds):
        pf = GLConfig._from_args(config, kwds)
        GLContext.__init__(self, share_group, pf, kwds)
        gl_config = pf._gtk_get_config()
        self._gl_config = gl_config
#		if share:
#			gtk_share = share.shared_context._gtk_get_gl_context()
#		else:
#			gtk_share = None
        gtk_share = self._gtk_get_share()
        GtkPixmap.__init__(self, width, height)
        gdk_pixmap = self._gdk_pixmap
        gdkgl.ext(gdk_pixmap)
        self._gl_drawable = gdk_pixmap.set_gl_capability(glconfig = gl_config)
        print "GLPixmap: self._gl_drawable =", self._gl_drawable ###
        self._gl_context = gdkgl.Context(
            self._gl_drawable,
            direct = False,
            share_list = gtk_share,
            render_type = gdkgl.RGBA_TYPE
        )
        print "GLPixmap: self._gl_context =", self._gl_context ###
        ImageBase.__init__(self, **kwds)
        self.with_context(self._init_context)
        print "GLPixmap: initialised context" ###
Exemplo n.º 2
0
	def __init__(self, width, height, config = None, share_group = None, **kwds):
		pf = GLConfig._from_args(config, kwds)
		GLContext.__init__(self, share_group, pf, kwds)
		gl_config = pf._gtk_get_config()
		self._gl_config = gl_config
#		if share:
#			gtk_share = share.shared_context._gtk_get_gl_context()
#		else:
#			gtk_share = None
		gtk_share = self._gtk_get_share()
		GtkPixmap.__init__(self, width, height)
		gdk_pixmap = self._gdk_pixmap
		gdkgl.ext(gdk_pixmap)
		self._gl_drawable = gdk_pixmap.set_gl_capability(glconfig = gl_config)
		print "GLPixmap: self._gl_drawable =", self._gl_drawable ###
		self._gl_context = gdkgl.Context(
			self._gl_drawable,
			direct = False,
			share_list = gtk_share,
			render_type = gdkgl.RGBA_TYPE
		)
		print "GLPixmap: self._gl_context =", self._gl_context ###
		ImageBase.__init__(self, **kwds)
		self.with_context(self._init_context)
		print "GLPixmap: initialised context" ###
Exemplo n.º 3
0
 def __init__(self, width, height):
     GtkPixmap.__init__(self, width, height)
Exemplo n.º 4
0
 def __init__(self, width, height):
     GtkPixmap.__init__(self, width, height)