Re: [GtkGLExt] gtkglext and glade (python)
- From: "Marco Bonifazi" <marcobonifazi gmail com>
- To: "Tiago Correa" <ctiagotb yahoo com br>
- Cc: gtkglext-list gnome org
- Subject: Re: [GtkGLExt] gtkglext and glade (python)
- Date: Wed, 28 Mar 2007 14:53:15 +0200
On 3/28/07,
Tiago Correa <
ctiagotb yahoo com br> wrote:
Hello,
I've application in python with a interface in a glade file that contains a drawingarea and I would like to insert a opengl scene at this drawingarea. But how can I do it?
I tried to this:
gladefile = gtk.glade.XML("opengl.glade")
glarea = gladefile.get_widget('drawingarea1')
gtk.gtkgl.widget_set_gl_capability(glarea,glconfig,None,True, gtk.gdkgl.RGBA_TYPE)
a = gtk.gtkgl.widget_is_gl_capable
(glarea)
print a
but don't worked =/
I use a different code, but I don't see in your the config initialization
display_mode = (gtk.gdkgl.MODE_RGB | gtk.gdkgl.MODE_DOUBLE)
try:
glconfig = gtk.gdkgl.Config(mode=display_mode)
except gtk.gdkgl.NoMatches:
display_mode &= ~gtk.gdkgl.MODE_SINGLE
glconfig = gtk.gdkgl.Config(mode = display_mode)
--
Marco Bonifazi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]