the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
Ensures that the @area framebuffer object is made the current draw and read target, and that all the required buffers for the @area are created and bound to the frambuffer.
Returns whether the area is in auto render mode or not.
Retrieves the #GdkGLContext used by @area.
Gets the current error set on the @area.
Returns whether the area has an alpha component.
Returns whether the area has a depth buffer.
Returns whether the area has a stencil buffer.
Retrieves the required version of OpenGL set using gtk_gl_area_set_required_version().
Retrieves the value set by gtk_gl_area_set_use_es().
Ensures that the #GdkGLContext used by @area is associated with the #GtkGLArea.
Marks the currently rendered data (if any) as invalid, and queues a redraw of the widget, ensuring that the #GtkGLArea::render signal is emitted during the draw.
If @auto_render is %TRUE the #GtkGLArea::render signal will be emitted every time the widget draws. This is the default and is useful if drawing the widget is faster.
Sets an error on the area which will be shown instead of the GL rendering. This is useful in the #GtkGLArea::create-context signal if GL context creation fails.
If @has_alpha is %TRUE the buffer allocated by the widget will have an alpha channel component, and when rendering to the window the result will be composited over whatever is below the widget.
If @has_depth_buffer is %TRUE the widget will allocate and enable a depth buffer for the target framebuffer. Otherwise there will be none.
If @has_stencil_buffer is %TRUE the widget will allocate and enable a stencil buffer for the target framebuffer. Otherwise there will be none.
Sets the required version of OpenGL to be used when creating the context for the widget.
Sets whether the @area should create an OpenGL or an OpenGL ES context.
The ::create-context signal is emitted when the widget is being realized, and allows you to override how the GL context is created. This is useful when you want to reuse an existing GL context, or if you want to try creating different kinds of GL options.
The ::render signal is emitted every time the contents of the #GtkGLArea should be redrawn.
The ::resize signal is emitted once when the widget is realized, and then each time the widget is changed while realized. This is useful in order to keep GL state up to date with the widget size, like for instance camera properties which may depend on the width/height ratio.
A really simple Demo illustrating OpenGL core profile with GtkD This example is provided under the terms of the GPL License.
@author sebastien.alaiwan@gmail.com