Re: [GtkGLExt] gtkglext and glade (python)

Hi marco the code is this

# use GLUT-style display mode bitmask
    # try double-buffered
    glconfig = gtk.gdkgl.Config(mode = gtk.gdkgl.MODE_RGB    |
                                       gtk.gdkgl.MODE_DOUBLE |
except gtk.gdkgl.NoMatches:
    # try single-buffered
    glconfig = gtk.gdkgl.Config(mode = gtk.gdkgl.MODE_RGB    |

You said that you uses another code, how you use?


Marco Bonifazi <marcobonifazi gmail com> escreveu:
On 3/28/07, Tiago Correa <ctiagotb yahoo com br> wrote:

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 ="")   
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)
          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

Fale com seus amigos de graça com o novo Yahoo! Messenger

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