### Signal

# Gtk GLArea::create-context

since: 4.0

#### Declaration

    GdkGLContext*
    create_context (
      GtkGLArea* self,
      gpointer user_data
    )

#### Description [src]

Emitted when the widget is being realized.

This allows you to override how the GL context is created. This is useful when you want to reuse an existing GL context, or if you want to try creating different kinds of GL options.

If context creation fails then the signal handler can use `gtk_gl_area_set_error()` to register a more detailed error of how the construction failed.

Default handler: The default handler is called after the handlers added via `g_signal_connect()`.
Available since: 4.0

#### Return value

Type: `GdkGLContext`

A newly created `GdkGLContext`; the `GtkGLArea` widget will take ownership of the returned value.

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