Re: Working on 119189 this weekend

(Sorry for the lack of progress this weekend.  The youngest was
feeling ill this weekend and in the ER on Saturday night.  Made for
difficulty finding time to poke at this.)

Hey there Kevin,

Yes, there are a couple of projects to create gtk+ widgets with OpenGL
contexts.  GtkGLExt is one of them.  The first gtk+ project I did with
OpenGL was initially done using GtkGLExt.  This library can be used to
add an OpenGL rendering context to any widget, blessing it as a
drawing surface.

In contrast, the GtkGLArea aproach creates a widget with the express
purpose of being an OpenGL drawing surface.  It is a widget class
which derives from GtkDrawingArea and has a few additional methods, in
particular gtk_gl_area_make_current, which attaches the underlying
OpenGL rendering context to the drawing area, and
gtk_gl_area_swap_buffers, which performs the OpenGL front/back buffer

The heavy lifting is offloaded to the GdkGLContext class, which
implements the windowing-system-specific OpenGL context functionality.

My hope is to merge this code into the gtk+ module.  If I find enough
time to put something together, I'll submit the patch here.  It sounds
like the core developers don't feel that the widget is general-purpose
enough to be accepted.  It also seems there is concern that OpenGL is
not ubiquitous enough that such a widget would be available on all

But let's see how it goes :)



On Thu, Feb 05, 2009 at 04:50:27PM -0800, Fox, Kevin M wrote:
> Hi C.J,
> Correct me if I'm wrong, but I thought something like this was already
> done. GtkGLext
> Kevin
> -----Original Message-----
> From: gtk-devel-list-bounces gnome org
> [mailto:gtk-devel-list-bounces gnome org] On Behalf Of C.J.
> Adams-Collier
> Sent: Thursday, February 05, 2009 4:04 PM
> To: gtk-devel-list gnome org
> Subject: Working on 119189 this weekend
> Hey all,
> I'm planning some time to work on 119189 this weekend.  I'm going to see
> if I can put together a patch to add gtkgl.c and friends into gtk.
> Behdad has suggested (and correct me if I've got this wrong, Behdad)
> that he feels that instead of creating a dedicated OpenGL drawing widget
> (similar to GtkDrawingArea), it would be better to add a method to the
> API which allows a widget to be imbued with the ability to have OpenGL
> primitives drawn to it.
> What are your thoughts?  
> Cheers,
> C.J.

Attachment: signature.asc
Description: Digital signature

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