This widget is derived from Gtk_Drawing_Area and provides an area where it is possible to use the openGL API.
Widget Hierarchy |
---|
GObject (see section Package Glib.Object)
Gtk_Object (see section Package Gtk.Object)
\___ Gtk_Widget (see section Package Gtk.Widget)
\___ Gtk_Drawing_Area (see section Package Gtk.Drawing
|
Types |
---|
type Attributes_Array is array (Natural range <>) of GL_Configs; | |
Note: as opposed to what exists in C, you don't need to have
the last element in the array be GDK_GL_NONE. This is done
transparently by GtkAda itself.
|
Subprograms |
---|
procedure Gtk_New (Widget : out Gtk_GLArea; Attr_List : in Attributes_Array); | ||
Make an OpenGL widget, Attr_List is passed to glXChooseVisual GLX call. | ||
procedure Gtk_New (Widget : out Gtk_GLArea; Attr_List : in Attributes_Array; Share : access Gtk_GLArea_Record'Class); | ||
Same as above. | ||
function Make_Current (Glarea : access Gtk_GLArea_Record'Class) return Boolean; | ||
Must be called before rendering into OpenGL widgets. | ||
procedure Swap_Buffers (Glarea : access Gtk_GLArea_Record'Class); | ||
Promote contents of back buffer of Glarea to front buffer. |