Re: OpenGL, GtkGlArea, GtkGLExt



On Thursday 06 March 2008 14:55:13 Emmanuele Bassi wrote:
  GdkGLContext *
  gdk_gl_create_context (GdkDrawable *drawable,
                         guint       *gl_attributes);

and, if the cached GdkGLContext gl_attributes are different than the
passed ones (with NULL meaning "use the default"), then scratch the
current context and return a new one - otherwise, return the context
created the first time the function was invoked.

That sounds fine to me. I'd replace the guint with a struct, of course.

Just to clarify, I have experienced some frustration using various 
OpenGL-based rendering techniques (glut, sdl, glarea etc.) because of the 
slow uptake to incorporate support for multisampling even though FSAA has 
been widely available on consumer-level hardware for many years. 
Multisampling is an unusual requirement in that it is part of creating a GL 
context rather than something you can address using ordinary OpenGL calls 
once the context has been created for you.

For example, I added this multisampling to the OCaml bindings to Glut only to 
discover that freeglut library only had dummy support for multisampling. The 
existing OCaml bindings to Gtk using GlArea also cannot support multisampling 
because GlArea does not. The OCaml community discussed the idea of adopting 
maintainence of GlArea to solve this problem but I think it would be better 
for everyone if we just moved to something unified and future proof as you 
suggest.

I assume widgets rendered using OpenGL will want the maximum possible 
multisampling anyway. So the default will probably be fine.

Many thanks,
-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e



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