Re: The best/standard way to use opengl in gtk
- From: Jeremy Henty <onepoint starurchin org>
- To: gtk-list gnome org
- Subject: Re: The best/standard way to use opengl in gtk
- Date: Thu, 30 Sep 2010 16:08:18 +0100
On Thu, Sep 30, 2010 at 03:47:59PM +0200, Ingo Krabbe wrote:
> On Thu, Sep 30, 2010 at 09:05:38PM +0800, Jin Huang wrote:
> > I'm a newbie of GTK, and working on 3D modeling software. I want
> > to create a window which can use opengl. The choice seems
> > gtkglext. However, this project is not active now.
> > Any suggestions?
> ... clutter is one of the best approaches that is about to become
> de-facto standard.
I would *not* recommend using clutter for 3D modeling software. At
work I recently had to profile various approaches to GTK canvases
(gdk, foocanvas, goocanvas, clutter, gtkglext). We write genome
browsers so we *have* to render thousands of items quickly. I imagine
3D modeling software would have similar constraints. We gave up on
clutter because of its performance. Not only did it render slowly but
creating a new clutter item was O(number of already existing items).
GtkGlext was the only approach that offered any hope of significantly
improving on good old foocanvas.
Clutter seems to be focussed on eye-candy. (It has built-in animation
support. Clutter demos typically show off something cool like a
tabbed window that flips the pages like a rolodex.) That is great for
users writing desktops and desktop applications, but it was useless
for our purposes. You should of course profile rather than just take
my word, nevertheless I would expect clutter's performance to be quite
inadequate for 3D modeling software.
BTW, if you profile clutter then be careful: for most toolkits you
time the expose event handler, but in clutter that just sends an alert
to a separate clutter animation event stream and triggers a paint
event handler. Make sure you profile the right thing!
] [Thread Prev