GLWidget

Description GtkGLExt is an extension to GTK which adds OpenGL capabilities to GtkWidget. Its use is quite simple: use gtk_widget_set_gl_capability to add OpenGL support to a widget, it will create a OpenGL drawable (GdkGLDrawable) for the widget, which can be obtained via gtk_widget_get_gl_drawable. OpenGL rendering context (GdkGLContext) can also be obtained via gtk_widget_get_gl_context. With GdkGLDrawable and GdkGLContext, gdk_gl_drawable_gl_begin and gdk_gl_drawable_gl_end can be called, and OpenGL function calls can be made between those two functions.

Members

Static functions

createGLContext
GLContext createGLContext(Widget widget, GLContext shareList, int direct, int renderType)

Creates a new GdkGLContext with the appropriate GdkGLDrawable for this widget. The GL context must be freed when you're finished with it. See also gtk_widget_get_gl_context().

getGLConfig
GLConfig getGLConfig(Widget widget)

Returns the GdkGLConfig referred by the widget.

getGLContext
GLContext getGLContext(Widget widget)

Returns the GdkGLContext with the appropriate GdkGLDrawable for this widget. Unlike the GL context returned by gtk_widget_create_gl_context(), this context is owned by the widget. GdkGLContext is needed for the function gdk_gl_drawable_begin, or for sharing display lists (see gtk_widget_set_gl_capability()).

getGLDrawable
GLDrawable getGLDrawable(Widget widget)

Gets the GL Frawable for (from???) the widget

getGLWindow
GLWindow getGLWindow(Widget widget)

Returns the GdkGLWindow owned by the widget.

isGLCapable
int isGLCapable(Widget widget)

Returns whether the widget is OpenGL-capable.

setGLCapability
int setGLCapability(Widget widget, GLConfig glconfig, GLContext shareList, int direct, int renderType)

Set the OpenGL-capability to the widget. This function prepares the widget for its use with OpenGL.

Meta