Top | ![]() |
![]() |
![]() |
![]() |
This is a simple implementation of GtkGlExt to create an
OpenGL surface that is a full GtkWidget. When creating such a
widget, one should give then a VisuUiGlWidgetRedrawMethod()
to tell the widget
how to redraw itself when needed.
The current implementation is working on X11 (built-in or with GtkGlExt) and Win32.
GtkWidget *
visu_ui_gl_widget_new (gboolean contextIsDirect
);
Create a new OpenGL area inside a GTK widget. If contextIsDirect
then
it tries to initialise the OpenGL context to a direct one.
void visu_ui_gl_widget_setModel (VisuUiGlWidget *render
,VisuGlExtSet *model
);
This method is used to defined a redraw method for the OpenGL area. By doing this
the area will automatically redraw itself when necessary. Before doing it
it calls visu_ui_gl_widget_setCurrent()
, and after it calls
swapGl()
.
gboolean visu_ui_gl_widget_setCurrent (VisuUiGlWidget *render
,gboolean force
);
Make this object current. This means that all future OpenGL primitive will be
rendered on this surface. If force
is TRUE, the GL routine is
actually called whereas in other cases, if render
believe being
already current, nothing is done.
VisuUiGlWidget * visu_ui_gl_widget_class_getCurrentContext ();
Class routine that returns the OpenGL widget which has the current context.