Rendering Context

## Rendering Context Rendering Context — OpenGL rendering context object |

## Synopsis

    #include <gdk/gdkgl.h>

                GdkGLContext;
    GdkGLContext* gdk_gl_context_new            (GdkGLDrawable *gldrawable,
                                                 GdkGLContext *share_list,
                                                 gboolean direct,
                                                 int render_type);
    void        gdk_gl_context_destroy          (GdkGLContext *glcontext);
    gboolean    gdk_gl_context_copy             (GdkGLContext *glcontext,
                                                 GdkGLContext *src,
                                                 unsigned long  mask);
    GdkGLDrawable* gdk_gl_context_get_gl_drawable
                                                (GdkGLContext *glcontext);
    GdkGLConfig* gdk_gl_context_get_gl_config   (GdkGLContext *glcontext);
    GdkGLContext* gdk_gl_context_get_share_list (GdkGLContext *glcontext);
    gboolean    gdk_gl_context_is_direct        (GdkGLContext *glcontext);
    int         gdk_gl_context_get_render_type  (GdkGLContext *glcontext);
    GdkGLContext* gdk_gl_context_get_current    (void);

## Object Hierarchy

      GObject
       +----GdkGLContext

## Description

## Details

### GdkGLContext

    typedef struct _GdkGLContext GdkGLContext;

### gdk_gl_context_new ()

    GdkGLContext* gdk_gl_context_new            (GdkGLDrawable *gldrawable,
                                                 GdkGLContext *share_list,
                                                 gboolean direct,
                                                 int render_type);

Creates a new OpenGL rendering context.

`gldrawable` : | a GdkGLDrawable.
`share_list` : | the GdkGLContext with which to share display lists and texture objects. NULL indicates that no sharing is to take place.
`direct` : | whether rendering is to be done with a direct connection to the graphics system.
`render_type` : | GDK_GL_RGBA_TYPE or GDK_GL_COLOR_INDEX_TYPE (currently not used).
Returns : | the new GdkGLContext.

### gdk_gl_context_destroy ()

    void        gdk_gl_context_destroy          (GdkGLContext *glcontext);

Destroys the OpenGL resources associated with `glcontext` and decrements `glcontext`'s reference count.

`glcontext` : | a GdkGLContext.

### gdk_gl_context_copy ()

    gboolean    gdk_gl_context_copy             (GdkGLContext *glcontext,
                                                 GdkGLContext *src,
                                                 unsigned long  mask);

Copy state from `src` rendering context to `glcontext`.

`mask` contains the bitwise-OR of the same symbolic names that are passed to the `glPushAttrib()` function. You can use GL_ALL_ATTRIB_BITS to copy all the rendering state information.

`glcontext` : | a GdkGLContext.
`src` : | the source context.
`Param3` : |
Returns : | FALSE if it fails, TRUE otherwise.

### gdk_gl_context_get_gl_drawable ()

    GdkGLDrawable* gdk_gl_context_get_gl_drawable
                                                (GdkGLContext *glcontext);

Gets GdkGLDrawable to which the `glcontext` is bound.

`glcontext` : | a GdkGLContext.
Returns : | the GdkGLDrawable or NULL if no GdkGLDrawable is bound.

### gdk_gl_context_get_gl_config ()

    GdkGLConfig* gdk_gl_context_get_gl_config   (GdkGLContext *glcontext);

Gets GdkGLConfig with which the `glcontext` is configured.

`glcontext` : | a GdkGLContext.
Returns : | the GdkGLConfig.

### gdk_gl_context_get_share_list ()

    GdkGLContext* gdk_gl_context_get_share_list (GdkGLContext *glcontext);

Gets GdkGLContext with which the `glcontext` shares the display lists and texture objects.

`glcontext` : | a GdkGLContext.
Returns : | the GdkGLContext.

### gdk_gl_context_is_direct ()

    gboolean    gdk_gl_context_is_direct        (GdkGLContext *glcontext);

Returns whether the `glcontext` is a direct rendering context.

`glcontext` : | a GdkGLContext.
Returns : | TRUE if the `glcontext` is a direct rendering contest.

### gdk_gl_context_get_render_type ()

    int         gdk_gl_context_get_render_type  (GdkGLContext *glcontext);

Gets render_type of the `glcontext`.

`glcontext` : | a GdkGLContext.
Returns : | GDK_GL_RGBA_TYPE or GDK_GL_COLOR_INDEX_TYPE.

### gdk_gl_context_get_current ()

    GdkGLContext* gdk_gl_context_get_current    (void);

Returns the current GdkGLContext.

Returns : | the current GdkGLContext or NULL if there is no current context.