Hi!
While porting my program to Win32 I found a small bug in Win32 version of gtkglext, in file gdk/win32/gdkglconfig-win32.c, in function gdk_gl_config_parse_attrib_list: if attrib_list does not specify any of flags GDK_GL_RED_SIZE, GDK_GL_GREEN_SIZE, GDK_GL_BLUE_SIZE or GDK_GL_BUFFER_SIZE then pfd->cColorBits is left at default value 32. But this default value is too big, some graphic cards may be unable to supply such color precision (especially when double buffer is also requested).
E.g. my program is unable to obtain GdkGLConfig using gdk_gl_config_new with simple attrib_list
GDK_GL_RGBA,
GDK_GL_DOUBLEBUFFER,
GDK_GL_ATTRIB_LIST_NONE
but when I add
GDK_GL_BUFFER_SIZE, 0,
then I get usable GdkGLConfig.
I believe that to fix it you should simply replace line 120 of file gdk/win32/gdkglconfig-win32.c from
pfd->cColorBits = 32; /* Max */
to
pfd->cColorBits = 0; /* Use default color bits */
This way if I don't specify any of flags GDK_GL_RED_SIZE, GDK_GL_GREEN_SIZE, GDK_GL_BLUE_SIZE or GDK_GL_BUFFER_SIZE it will be understood that I don't care about how many bits I get in color buffer.
Regards, Michalis. _______________________________________________ gtkglext-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkglext-list
