GL module

gl_create_context

proceduresince 0.31.0Source

Makes an OpenGL context for win and sets it current. The version defaults to what the platform offers; set compatibility for the old fixed pipeline and debug for a debug context. Aborts if the context cannot be made.

Example↗
#import "Window_Creation";

window := create_window(800, 600, "gl");
gl_create_context(window, 3, 3);

This one is only checked to compile, not run.

gl_create_context :: (
    win: $Window,
    major_version: s32 = 0,
    minor_version: s32 = 0,
    compatibility := false,
    debug := false,
    wanted_msaa: s32 = DEFAULT_MSAA
)

Parameters

win: $Window
major_version: s32 = 0
minor_version: s32 = 0
compatibility := false
debug := false
wanted_msaa: s32 = DEFAULT_MSAA

See also