Although Gtk+ is a C library osgGtk provides two core C++ classes, ViewerGtk and GraphicsWindowGtk, that respectively subclass from OSG's Viewer and GraphicsWindow. GraphicsWindowGtk maintains a gtkglext DrawingArea that provides ViewerGtk with an OpenGL rendering context. GraphicsWindowGtk's get_widget() method returns a GtkWidget* that can be used as normal in a Gtk application.
osgGtkmm also provides two similar classes, ViewerGtkmm and GraphicsWindowGtkmm. However, GraphicsWindowGtkmm uses multiple inheritance to subclass from both osgViewer::GraphicsWindow and Gtk::GL:

For more information on how to use these classes see the examples in the API documentation or in the examples directory in the source tarball.
Ratings & Comments
0 Comments