CoreGL

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

Constructors

this
this()
Undocumented in source.

Members

Functions

drawTriangle
void drawTriangle()
Undocumented in source. Be warned that the author may not have intended to support it.
initBuffers
void initBuffers(uint position_index, uint color_index)
Undocumented in source. Be warned that the author may not have intended to support it.
realize
void realize(Widget )
Undocumented in source. Be warned that the author may not have intended to support it.
render
bool render(GLContext c, GLArea a)
Undocumented in source. Be warned that the author may not have intended to support it.
unrealize
void unrealize(Widget )
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

m_Mvp
GLuint m_Mvp;
Undocumented in source.
m_Program
GLuint m_Program;
Undocumented in source.
m_Vao
GLuint m_Vao;
Undocumented in source.

Inherited Members

From GLArea

gtkGLArea
GtkGLArea* gtkGLArea;

the main Gtk struct

getGLAreaStruct
GtkGLArea* getGLAreaStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
attachBuffers
void attachBuffers()

Binds buffers to the framebuffer.

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.

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.

getUseEs
bool getUseEs()

Returns whether the GtkGLArea should use OpenGL 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.

setAutoRender
void setAutoRender(bool autoRender)

Sets whether the GtkGLArea is in auto render mode.

setError
void setError(ErrorG error)

Sets an error on the area which will be shown instead of the GL rendering.

setHasDepthBuffer
void setHasDepthBuffer(bool hasDepthBuffer)

Sets whether the GtkGLArea should use a depth buffer.

setHasStencilBuffer
void setHasStencilBuffer(bool hasStencilBuffer)

Sets whether the GtkGLArea should use a stencil buffer.

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.

addOnCreateContext
gulong addOnCreateContext(GLContext delegate(GLArea) dlg, ConnectFlags connectFlags)

Emitted when the widget is being realized.

addOnRender
gulong addOnRender(bool delegate(GLContext, GLArea) dlg, ConnectFlags connectFlags)

Emitted every time the contents of the GtkGLArea should be redrawn.

addOnResize
gulong addOnResize(void delegate(int, int, GLArea) dlg, ConnectFlags connectFlags)

Emitted once when the widget is realized, and then each time the widget is changed while realized.

Meta