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

## Functions

gboolean | gdk_gl_drawable_make_current ()
gboolean | gdk_gl_drawable_is_double_buffered ()
void | gdk_gl_drawable_swap_buffers ()
void | gdk_gl_drawable_wait_gl ()
void | gdk_gl_drawable_wait_gdk ()
gboolean | gdk_gl_drawable_gl_begin ()
void | gdk_gl_drawable_gl_end ()
GdkGLConfig * | gdk_gl_drawable_get_gl_config ()
void | gdk_gl_drawable_get_size ()
GdkGLDrawable * | gdk_gl_drawable_get_current ()

## Types and Values

| GdkGLDrawable

## Object Hierarchy

        GInterface
        ╰── GdkGLDrawable

## Includes

    #include <gdk/gdkgl.h>

## Description

## Functions

### gdk_gl_drawable_make_current ()

    gboolean
    gdk_gl_drawable_make_current (GdkGLDrawable *gldrawable,
                                  GdkGLContext *glcontext);

Attach an OpenGL rendering context to a `gldrawable` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

## Types and Values

### GdkGLDrawable

    typedef struct _GdkGLDrawable GdkGLDrawable;