SimpleGL

This is a Simple class extending the DrawingArea widget. A really simple Demo illustrating OpenGL with DUI It uses the new 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(GdkEventExpose* event)

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

put any gl initializations here returns true to consume the event

resizeGL
bool resizeGL(GdkEventConfigure* 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

glDrawFrame
bool glDrawFrame()

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

glDrawFrame
bool glDrawFrame(Widget widget)

The application should use this method to redraw the scene 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.
exposeFrame
bool exposeFrame(GdkEventExpose* event, Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
configureFrame
bool configureFrame(GdkEventConfigure* 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(GdkEventVisibility* event, Widget widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMap
bool onMap()
Undocumented in source. Be warned that the author may not have intended to support it.
onUnmap
bool onUnmap()
Undocumented in source. Be warned that the author may not have intended to support it.
onVisibility
bool onVisibility(GdkEventVisibility* 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()
Undocumented in source. Be warned that the author may not have intended to support it.
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.
size
void size(int width, int height)

Warning gtk_drawing_area_size is deprecated and should not be used in newly-written code. Use gtk_widget_set_size_request() instead. Sets the size that the drawing area will request in response to a "size_request" signal. The drawing area may actually be allocated a size larger than this depending on how it is packed within the enclosing containers.

Meta