Re: gtk/gtkglext help please



On Tue, Jun 06, 2006 at 11:32:43PM -0600, Brett Stottlemyer wrote:

I'm interested in displaying large quantities of scientific data in a
UNIX/LINUX environment.  I write computationally intensive code in C++, and
I've used tools like matlab to display results, including generating GUIs
(i.e., I'm familiar will callbacks and event driven programming, at least
somewhat).  The problem is that if I have my code output a file for matlab
to import, the feedback to the code is lost.

So I want to take the plunge and start writing displays and a UI for my
code.  I'd like to take advantage of the video hardware (seems like OpenGL's
Display Lists would be very useful), so using gtkglext with GTK+ seems like
a good option.  My desire is to be able to display lots of data and
manipulate the view as well as interactively select portions of the data for
additional processing.

So, my questions are:

1)       Does creating my own windows with GTK+ and gtkglext seem like a
good option?

Yes, and I would s/windows/widgets/.

2)       If so, the tutorials included with gtkglext don't include any
menus, so is there any sort of tutorial for allowing OpenGL processing
within a drawable widget while still having other widgets for UI (rotation,
data selection, etc.)?

Where did you look? The are lots of examples in examples/
in GtkGLExt source tarball and they include buttons, context
menus, even a GtkButton with an OpenGL area on it.

You can also have a look at Gwy3DView and Gwy3DWindow
widgets in Gwyddion (http://gwyddion.net/) as a bit more
complex examples with rotation, zoom, light position setting
and additional controls.

Once you create your own OpenGL widget -- which should be
easy based on the examples -- you can work with it as with
any other widget.  And the only places where the GL-ness
affects widget implementation will be probably
initialization (setting gl capability), configure
(glViewport) and of course expose (drawing).

Yeti


--
Anonyms eat their boogers.



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