v2026.11.2
All Bundles
Bundle

OpenGL 3.3 core rendering on top of SDL2. Builds on sdl2.obl for the window and context; this bundle is the GL side. Compile with -lib sdl2.

Layers, thinnest first: GLWindow (window and context), GL (state), Shader, Mesh, Texture2D, Light, RenderTarget, Material, Frustum, ShadowMap, PointShadow, Overlay, Transform, and Box/Scene. All public, so nothing is capped.

Targets the 3.3 core profile, forward-compatible: the highest common denominator across the desktop platforms Objeck ships, since macOS caps at 4.1 core. GLES-only hardware is out of scope by construction.

See docs/opengl.md for setup, a minimal program, why the calls are coarse-grained, and how to add one.

Vector3

A 3D vector, for camera and scene math.

Mirrors Game.Framework's Vector2: mutating methods on an instance, plus static functions that return new values. Immutable-style helpers are named with a past participle (Normalized) to distinguish them from the in-place form (Normalize).

Operations

Add # function

function : Add(lhs:Vector3, rhs:Vector3) ~ Vector3

Parameters

NameTypeDescription
lhsVector3first vector
rhsVector3second vector

Return

TypeDescription
Vector3lhs + rhs

Cross # function

function : Cross(lhs:Vector3, rhs:Vector3) ~ Vector3

Parameters

NameTypeDescription
lhsVector3first vector
rhsVector3second vector

Return

TypeDescription
Vector3the cross product, lhs x rhs

Dot # function

function : Dot(lhs:Vector3, rhs:Vector3) ~ Float

Parameters

NameTypeDescription
lhsVector3first vector
rhsVector3second vector

Return

TypeDescription
Floatthe dot product

Length #

method : public : Length() ~ Float

Return

TypeDescription
Floatthe vector's length

Normalized #

method : public : Normalized() ~ Vector3

Return

TypeDescription
Vector3a new unit-length copy; a zero vector comes back unchanged

Scale # function

function : Scale(v:Vector3, scale:Float) ~ Vector3

Parameters

NameTypeDescription
vVector3the vector
scaleFloatthe factor

Return

TypeDescription
Vector3v * scale

Subtract # function

function : Subtract(lhs:Vector3, rhs:Vector3) ~ Vector3

Parameters

NameTypeDescription
lhsVector3first vector
rhsVector3second vector

Return

TypeDescription
Vector3lhs - rhs