[pygtk] pygtk-2.2/pygtk-2.4 and pyOpenGL

Bernhard.Rumpler at tttech.com Bernhard.Rumpler at tttech.com
Thu Aug 12 21:39:16 WST 2004


Johan Dahlin <johan at gnome.org> wrote on 12.08.2004 14:23:48:
> tor 2004-08-12 klockan 14.09 skrev Bernhard.Rumpler at tttech.com:
> > TypeError: multiple bases have instance lay-out conflict
> 
> Can you provide us with a small testcase? Hopefully without any pyOpenGL
> code at all.

Unfortunately, the problem seems to have something to do with
pyOpenGL, as the problem (the type error cited above together 
with a segmentation fault) occurs when calling 
gtk.gtkgl.widget_get_gl_drawable in the sample script below.

The problem does not occur, when a widget delivers None as its
gl_drawable (e.g., if widget_set_gl_capability has not been
called).

thanks for any hints!
Bernhard


import gtk
import gtk.gtkgl
import gtk.gdkgl

def on_realize (widget, *args) :
    print gtk.gtkgl.widget_get_gl_drawable (widget) # <-XXX segfault!

# gtk-stuff:
w = gtk.Window ()
d = gtk.DrawingArea ()
d.connect ("realize", on_realize)

# gtkgl-stuff:
glconfig = gtk.gdkgl.Config (mode = gtk.gdkgl.MODE_RGBA)
gtk.gtkgl.widget_set_gl_capability (d, glconfig)

w.add (d)
w.show_all ()

gtk.main ()



More information about the pygtk mailing list