This document collects OpenGLContext-specific documentation. The main PyOpenGL documentation collection includes links to both PyOpenGL and OpenGL documentation which will be of use to the OpenGLContext programmer as well.
These are Khronos glTF sample models drawn by the PBR pass. Each is a render the regression suite compares against, so what is on this page is what the engine is held to. Loading glTF covers the format and what of it is supported; physically based rendering covers the material model these exercise. Every model is credited in ATTRIBUTION.md.
OpenGLContext needs Python 3.10 or newer. Install it and its core dependencies (NumPy, PyOpenGL, Pillow, PyVRML97, TTFQuery, SimpleParse, PyDispatcher, pygltflib, omi_audio and omi_physics) from PyPI:
pip install OpenGLContext
Optional extras pull in the pieces you need for particular features:
OpenGLContext[glfw] -- the GLFW backend (recommended for
core-profile and PBR rendering)OpenGLContext[draco] -- Draco-compressed glTF geometry
(pulls in DracoPy). The glTF loader itself is
core, so the oglc-view viewer
reads .gltf/.glb out of the base installOpenGLContext[audio] -- the playback backend that reaches
a sound card. Audio is core and mixes without
it; this is what makes it audibleOpenGLContext[video] -- recording
what the engine draws to an H.264 file, using the video encoder in
the graphics driverOpenGLContext[pygame], OpenGLContext[wx] --
the PyGame and wxPython backendsOpenGLContext[all] -- every backend, plus Draco and
audio playbackuvuv resolves and installs the whole dependency set (including SimpleParse, PyVRML97 and TTFQuery) from PyPI. In a checkout:
uv venv uv pip install -e ".[glfw,gltf]"
or, to run a script without managing a virtual environment yourself:
uv run --with "OpenGLContext[glfw,gltf]" oglc-view model.glb
Installing the package puts these on your path:
oglc-viewoglc-terrain--dem, or an existing 3D Tiles tileset. See
Streamed 3D Tiles.oglc-gltf-demooglc-gltf-regressionoglc-ui-demooglc-character-sheetindex.html over the set. A bad silhouette, a foot
through the floor or an arm through the ribs shows up at a glance
where scrubbing a viewer finds one at a time. Drawn through the
ordinary PBR pass, so the sheet shows what a game gets. See
Rigged characters.oglc-testoglc-deb/opt, with
nothing for the machine to install. See
Packaging an application.oglc-lorentzoglc-gltf, oglc-vrml and
oglc-tiles are deprecated aliases for
oglc-view, kept for one release cycle; each prints a notice
and forwards. Use oglc-view in anything new.
Start with the Rendering documents if you want to understand how a frame is drawn, Supporting Features for the systems that run beside the renderer — how the player moves, what the world does, what it sounds like — and Content for loading and displaying models and worlds. The NeHe tutorial translations are a good starting point for beginning OpenGL programmers.









oglc-ui-demo demopython -m OpenGLContext.telemetry or
replaying it, so a failure somebody else met runs
again here/opt with oglc-debExtrusion,
generated as vertex arrays and drawn in a core profile: join styles
and miter limits, spline paths sampled to a curvature tolerance,
rotation-minimizing frames, closed loops, and the constrained
Delaunay tessellator that fills their caps and any other outline you
hand itoglc-terrain viewer -- plus what a third-party
tileset.json is allowed to reach (support is
experimental)KHR_audio_emitter model: distance
curves, directional cones, equal-power panning, a fixed voice pool
with priority stealing, an underwater muffle, and silence as a
first-class backend. The engine is the standalone
omi_audio package; OpenGLContext supplies the
scenegraph nodes and the per-context engineoglc-view:
one command that opens a glTF model, a VRML97 world, an OBJ or a
streamed 3D Tiles dataset, its library of samples, its screens
and controls, embedding it as a
component and adding a formatoglc-character-sheet for looking at every
clip at oncepy.typed marker that has a project's
calls into the engine checked, the generated stub that declares the
node namespace, regenerating it after adding a node, and what stays
AnyThe râison d'ętre (apologies for my rusty French) for OpenGLContext
is to
provide a platform for testing and sample code, so you'll find a lot of
it lurking about in the project. In particular, in the source-code
release, you can find
sample code for:
Extrusion,
generated as vertex arrays