[GtkGLExt] Problem with shared lists



Hi all!

My app supports an arbitrary number of GTK top windows, each one with a GTKGLExt drawing area. I am using OpenGL shared pre-compiled listsI am following the basic design exemplified in the shared_lists.c example that comes with GTKGlExt.

My problem can be described as folows:

1) Launch the app, to create window 1. Create OpenGL shared list A.

2) create window 2 and shared list B. Everything works fine. Lists A and B are shared betwen windows 1 and 2 (if I create more windows and more lists, everything works fine. All lists are shared and work fine).

3) now remove window 1: lists A and B still work fine in  window 2.

4) create window 3. Lists A and B no longer work on window 3.

Clearly, it seems the GLContext (containing the shared lists info) gets corrupted after window 1 is removed. It seems lists are removed when the first GL area is removed...

When I create the first window, I pass this:
gtk_widget_set_gl_capability (area,
glconfig, NULL, TRUE, GDK_GL_RGBA_TYPE);

then after the window is realized, save the glcontext with:
glcontext = gtk_widget_get_gl_context (area);

and when creating all the other windows, pass the saved context:
gtk_widget_set_gl_capability (drawing_area,
glconfig, glcontext, TRUE, GDK_GL_RGBA_TYPE);

Could someone help me please? is this bad design from my part? is it a GtkGlExt bug? is it a Mesa bug?

Thank you very much!
Carlos Pereira





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