SimpleGL

This is a Simple class extending the DrawingArea widget. A really simple Demo illustrating OpenGL with GtkD It uses the GLCapability mixin to add the GL capabilities to the widget. This example is provided under the terms of the GPL License. Note the initialization of the GLCapabilities on the constructor.

@author pac@tuxfamily.org

Constructors

this
this()

Construct a simple DrawingArea and sets the GLCapabilities

Members

Functions

drawGL
bool drawGL()

This method is called every time the window must be paint or repaint This is where you put the OpenGL call to draw something. This method call be called directly by the application without an event object to force redrawing of the scene. returns true to consume the event

initGL
void initGL()

put any gl initializations here returns true to consume the event

resizeGL
bool resizeGL(Event event)

This method is called when the window is resized returns true to consume the event

Mixins

__anonymous
mixin GLCapability

need to include the mixin to add GL capabilities to this widget

Variables

height
GLfloat height;
Undocumented in source.
width
GLfloat width;
Undocumented in source.

Mixed In Members

From mixin GLCapability

width
GLfloat width;
Undocumented in source.
height
GLfloat height;
Undocumented in source.
getGlWidth
GLfloat getGlWidth()
Undocumented in source. Be warned that the author may not have intended to support it.
getGlHeight
GLfloat getGlHeight()
Undocumented in source. Be warned that the author may not have intended to support it.
setGlCapability
bool setGlCapability(GLConfig glConfig, int renderType)

Sets the GL capabilities for the widget

setGlCapability
bool setGlCapability(Widget widget, GLConfig glConfig, GLContext shareList, bool direct, int renderType)

Set the GL capabilities for the widget

drawFrame
bool drawFrame()

The widget should use this method to redraw it self at any time

alreadyRealized
bool alreadyRealized;
Undocumented in source.
getAlreadyRealized
bool getAlreadyRealized()
Undocumented in source. Be warned that the author may not have intended to support it.
realizeFrame
void realizeFrame(Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
drawFrame
bool drawFrame(Scoped!Context cr, Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
configureFrame
bool configureFrame(Event event, Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
mapFrame
void mapFrame(Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
unmapFrame
void unmapFrame(Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
visibilityFrame
bool visibilityFrame(Event event, Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMap
void onMap()
Undocumented in source. Be warned that the author may not have intended to support it.
onUnmap
void onUnmap()
Undocumented in source. Be warned that the author may not have intended to support it.
onVisibility
bool onVisibility(Event event)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From DrawingArea

gtkDrawingArea
GtkDrawingArea* gtkDrawingArea;

the main Gtk struct

getDrawingAreaStruct
GtkDrawingArea* getDrawingAreaStruct(bool transferOwnership)

Get the main Gtk struct

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()

Meta