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



Hi,

When using pygtk-2.2 (pygtk-2.2.0-1.win32-py2.3) together with
pyOpenGL (PyOpenGL-2.0.1.08.py2.3-numpy23) everything
works fine. But when using pygtk-2.4 (pygtk-2.3.96.win32-py2.3)
I get the following traceback when calling show_all () on the 
widget tree containing the gtk.DrawingArea:

TypeError: multiple bases have instance lay-out conflict

What could be the reason for this? (using gtk+-2.4.4)

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 !
Martin


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 ()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]