Rendering Surface

## Rendering Surface Rendering Surface — OpenGL rendering surface interface |

## Synopsis

    #include <gdk/gdkgl.h>

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

## Object Hierarchy

      GInterface
       +----GdkGLDrawable

## Description

## Details

### GdkGLDrawable

    typedef struct _GdkGLDrawable GdkGLDrawable;

### gdk_gl_drawable_make_current ()

    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.

### gdk_gl_drawable_is_double_buffered ()

    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.

### gdk_gl_drawable_swap_buffers ()

    void        gdk_gl_drawable_swap_buffers    (GdkGLDrawable *gldrawable);

Exchange front and back buffers.

`gldrawable` : | a GdkGLDrawable.

### gdk_gl_drawable_wait_gl ()

    void        gdk_gl_drawable_wait_gl         (GdkGLDrawable *gldrawable);

Complete OpenGL execution prior to subsequent GDK drawing calls.

`gldrawable` : | a GdkGLDrawable.

### gdk_gl_drawable_wait_gdk ()

    void        gdk_gl_drawable_wait_gdk        (GdkGLDrawable *gldrawable);

Complete GDK drawing execution prior to subsequent OpenGL calls.

`gldrawable` : | a GdkGLDrawable.

### gdk_gl_drawable_gl_begin ()

    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.

### gdk_gl_drawable_gl_end ()

    void        gdk_gl_drawable_gl_end          (GdkGLDrawable *gldrawable);

Delimits the end of the OpenGL execution.

`gldrawable` : | a GdkGLDrawable.

### gdk_gl_drawable_get_gl_config ()

    GdkGLConfig* gdk_gl_drawable_get_gl_config  (GdkGLDrawable *gldrawable);

Gets GdkGLConfig with which the `gldrawable` is configured.

`gldrawable` : | a GdkGLDrawable.
Returns : | the GdkGLConfig.

### gdk_gl_drawable_get_size ()

    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.

### gdk_gl_drawable_get_current ()

    GdkGLDrawable* gdk_gl_drawable_get_current  (void);

Returns the current GdkGLDrawable.

Returns : | the current GdkGLDrawable or NULL if there is no current drawable.