### Method

# Gdk Display create_gl_context

since: 4.6

#### Declaration [src]

    GdkGLContext*
    gdk_display_create_gl_context (
      GdkDisplay* self
      GError** error
    )

#### Description [src]

Creates a new `GdkGLContext` for the `GdkDisplay`.

The context is disconnected from any particular surface or surface and cannot be used to draw to any surface. It can only be used to draw to non-surface framebuffers like textures.

If the creation of the `GdkGLContext` failed, `error` will be set. Before using the returned `GdkGLContext`, you will need to call `gdk_gl_context_make_current()` or `gdk_gl_context_realize()`.

Available since: 4.6

#### Return value

Type: `GdkGLContext`

The newly created `GdkGLContext`

The caller of the method takes ownership of the data, and is responsible for freeing it.