v2026.9.4
All Bundles
Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.

GLContext

An OpenGL context, created from a Window with GLCreateContext. Like every SDL handle in this bundle this wraps a raw native pointer, so the collector cannot see it -- call Delete() when you are done. Deleting a context while it is current is allowed; SDL unbinds it first.

Operations

Delete #

Destroy this context. Safe to call more than once.

method : public : Delete() ~ Nil

GetContext #

The raw context handle. Needed by Window->GLMakeCurrent; not useful otherwise.

method : public : GetContext() ~ Int

Return

TypeDescription
Intnative context pointer as an Int

IsNull #

Determines if the underlying SDL context is NULL

method : public : IsNull() ~ Bool

Return

TypeDescription
Booltrue if NULL, false otherwise