Method

HsFrontendcreate_gl_context

Declaration [src]

HsGLContext*
hs_frontend_create_gl_context (
  HsFrontend* self,
  HsGLAPI api,
  int major_version,
  int minor_version,
  HsGLFlags flags
)

Description [src]

Creates an OpenGL context.

The context will use the provided API and version.

The context must be realized before use, using hs_gl_context_realize(). realize() can fail, for example if the requested API and/or version is not available.

Parameters

api

Type: HsGLAPI

The API to use.

major_version

Type: int

Major version, e.g. 3 in 3.2.

minor_version

Type: int

Minor version, e.g. 2 in 3.2.

flags

Type: HsGLFlags

Additional parameters for the context.

Return value

Type: HsGLContext

A newly created OpenGL context.

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