- gtkGLArea
GtkGLArea* gtkGLArea;
- getGLAreaStruct
GtkGLArea* getGLAreaStruct(bool transferOwnership)
- getStruct
void* getStruct()
the main Gtk struct as a void*
- setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
- getType
GType getType()
- attachBuffers
void attachBuffers()
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.
- getAutoRender
bool getAutoRender()
Returns whether the area is in auto render mode or not.
- getContext
GLContext getContext()
Retrieves the #GdkGLContext used by @area.
- getError
ErrorG getError()
Gets the current error set on the @area.
- getHasAlpha
bool getHasAlpha()
Returns whether the area has an alpha component.
- getHasDepthBuffer
bool getHasDepthBuffer()
Returns whether the area has a depth buffer.
- getHasStencilBuffer
bool getHasStencilBuffer()
Returns whether the area has a stencil buffer.
- getRequiredVersion
void getRequiredVersion(int major, int minor)
Retrieves the required version of OpenGL set
using gtk_gl_area_set_required_version().
- getUseEs
bool getUseEs()
Retrieves the value set by gtk_gl_area_set_use_es().
- makeCurrent
void makeCurrent()
Ensures that the #GdkGLContext used by @area is associated with
the #GtkGLArea.
- queueRender
void queueRender()
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.
- setAutoRender
void setAutoRender(bool autoRender)
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.
- setError
void setError(ErrorG error)
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.
- setHasAlpha
void setHasAlpha(bool hasAlpha)
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.
- setHasDepthBuffer
void setHasDepthBuffer(bool hasDepthBuffer)
If @has_depth_buffer is %TRUE the widget will allocate and
enable a depth buffer for the target framebuffer. Otherwise
there will be none.
- setHasStencilBuffer
void setHasStencilBuffer(bool hasStencilBuffer)
If @has_stencil_buffer is %TRUE the widget will allocate and
enable a stencil buffer for the target framebuffer. Otherwise
there will be none.
- setRequiredVersion
void setRequiredVersion(int major, int minor)
Sets the required version of OpenGL to be used when creating the context
for the widget.
- setUseEs
void setUseEs(bool useEs)
Sets whether the @area should create an OpenGL or an OpenGL ES context.
- OnCreateContextDelegateWrapper
class OnCreateContextDelegateWrapper
Undocumented in source.
- onCreateContextListeners
OnCreateContextDelegateWrapper[] onCreateContextListeners;
Undocumented in source.
- addOnCreateContext
gulong addOnCreateContext(GLContext delegate(GLArea) dlg, ConnectFlags connectFlags)
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.
- callBackCreateContext
GdkGLContext* callBackCreateContext(GtkGLArea* glareaStruct, OnCreateContextDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
- callBackCreateContextDestroy
void callBackCreateContextDestroy(OnCreateContextDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
- OnRenderDelegateWrapper
class OnRenderDelegateWrapper
Undocumented in source.
- onRenderListeners
OnRenderDelegateWrapper[] onRenderListeners;
Undocumented in source.
- addOnRender
gulong addOnRender(bool delegate(GLContext, GLArea) dlg, ConnectFlags connectFlags)
The ::render signal is emitted every time the contents
of the #GtkGLArea should be redrawn.
- callBackRender
int callBackRender(GtkGLArea* glareaStruct, GdkGLContext* context, OnRenderDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
- callBackRenderDestroy
void callBackRenderDestroy(OnRenderDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
- OnResizeDelegateWrapper
class OnResizeDelegateWrapper
Undocumented in source.
- onResizeListeners
OnResizeDelegateWrapper[] onResizeListeners;
Undocumented in source.
- addOnResize
gulong addOnResize(void delegate(int, int, GLArea) dlg, ConnectFlags connectFlags)
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.
- callBackResize
void callBackResize(GtkGLArea* glareaStruct, int width, int height, OnResizeDelegateWrapper wrapper)
Undocumented in source. Be warned that the author may not have intended to support it.
- callBackResizeDestroy
void callBackResizeDestroy(OnResizeDelegateWrapper wrapper, GClosure* closure)
Undocumented in source. Be warned that the author may not have intended to support it.
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