IGLContext#

Fully qualified name: carb::windowing::IGLContext

Defined in carb/windowing/IGLContext.h

struct IGLContext#

Defines an OpenGL context interface for off-screen rendering.

Public Members

GLContext *(*createContextOpenGL)(int width, int height)#

Creates a context for OpenGL.

Param width:

The width of the off-screen surface for the context.

Param height:

The height of the off-screen surface for the context.

Return:

The GL context created.

GLContext *(*createContextOpenGLES)(int width, int height)#

Creates a context for OpenGL(ES).

Param width:

The width of the off-screen surface for the context.

Param height:

The height of the off-screen surface for the context.

Return:

The GL context created.

void (*destroyContext)(GLContext *ctx)#

Destroys a GL context.

Param ctx:

The GL context to be destroyed.

void (*makeContextCurrent)(GLContext *ctx)#

Makes the GL context current.

After calling this you can make any GL function calls.

Param ctx:

The GL context to be made current.

void *(*getProcAddress)(const char *procName)#

Try and resolve an OpenGL or OpenGL(es) procedure address from name.

Param procName:

The name of procedure to load.

Return:

The address of procedure.

Public Static Functions

static inline constexpr carb::InterfaceDesc getInterfaceDesc(
) noexcept#

Returns information about this interface.

Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.

Returns:

The carb::InterfaceDesc struct with information about this interface.

static inline constexpr carb::InterfaceDesc getLatestInterfaceDesc(
) noexcept#

Returns information about the latest version of this interface.

Auto-generated by CARB_PLUGIN_INTERFACE() or CARB_PLUGIN_INTERFACE_EX.

Returns:

The carb::InterfaceDesc struct with information about the latest version of this interface.