GtkGLExt Reference Manual |
---|
Rendering Surface — OpenGL rendering surface interface
#include <gdk/gdkgl.h> struct GdkGLDrawable; gboolean gdk_gl_drawable_make_current (GdkGLDrawable *gldrawable, GdkGLContext *glcontext); gboolean gdk_gl_drawable_is_double_buffered (GdkGLDrawable *gldrawable); void gdk_gl_drawable_swap_buffers (GdkGLDrawable *gldrawable); void gdk_gl_drawable_wait_gl (GdkGLDrawable *gldrawable); void gdk_gl_drawable_wait_gdk (GdkGLDrawable *gldrawable); gboolean gdk_gl_drawable_gl_begin (GdkGLDrawable *gldrawable, GdkGLContext *glcontext); void gdk_gl_drawable_gl_end (GdkGLDrawable *gldrawable); GdkGLConfig* gdk_gl_drawable_get_gl_config (GdkGLDrawable *gldrawable); void gdk_gl_drawable_get_size (GdkGLDrawable *gldrawable, gint *width, gint *height); GdkGLDrawable* gdk_gl_drawable_get_current (void);
GInterface +----GdkGLDrawable
gboolean gdk_gl_drawable_make_current (GdkGLDrawable *gldrawable, GdkGLContext *glcontext);
Attach an OpenGL rendering context to a gldrawable.
gldrawable : | a GdkGLDrawable. |
glcontext : | a GdkGLContext. |
Returns : | TRUE if it is successful, FALSE otherwise. |
gboolean gdk_gl_drawable_is_double_buffered (GdkGLDrawable *gldrawable);
Returns whether the gldrawable supports the double-buffered visual.
gldrawable : | a GdkGLDrawable. |
Returns : | TRUE if the double-buffered visual is supported, FALSE otherwise. |
void gdk_gl_drawable_swap_buffers (GdkGLDrawable *gldrawable);
Exchange front and back buffers.
gldrawable : | a GdkGLDrawable. |
void gdk_gl_drawable_wait_gl (GdkGLDrawable *gldrawable);
Complete OpenGL execution prior to subsequent GDK drawing calls.
gldrawable : | a GdkGLDrawable. |
void gdk_gl_drawable_wait_gdk (GdkGLDrawable *gldrawable);
Complete GDK drawing execution prior to subsequent OpenGL calls.
gldrawable : | a GdkGLDrawable. |
gboolean gdk_gl_drawable_gl_begin (GdkGLDrawable *gldrawable, GdkGLContext *glcontext);
Delimits the begining of the OpenGL execution.
gldrawable : | a GdkGLDrawable. |
glcontext : | a GdkGLContext. |
Returns : | TRUE if it is successful, FALSE otherwise. |
void gdk_gl_drawable_gl_end (GdkGLDrawable *gldrawable);
Delimits the end of the OpenGL execution.
gldrawable : | a GdkGLDrawable. |
GdkGLConfig* gdk_gl_drawable_get_gl_config (GdkGLDrawable *gldrawable);
Gets GdkGLConfig with which the gldrawable is configured.
gldrawable : | a GdkGLDrawable. |
Returns : | the GdkGLConfig. |
void gdk_gl_drawable_get_size (GdkGLDrawable *gldrawable, gint *width, gint *height);
Fills *width and *height with the size of GL drawable. width or height can be NULL if you only want the other one.
gldrawable : | a GdkGLDrawable. |
width : | location to store drawable's width, or NULL. |
height : | location to store drawable's height, or NULL. |
GdkGLDrawable* gdk_gl_drawable_get_current (void);
Returns the current GdkGLDrawable.
Returns : | the current GdkGLDrawable or NULL if there is no current drawable. |
<< Rendering Context | OpenGL Pixmap >> |