Home /Modules/idea/README.md

README.md

idea/sleela-native/README.md · 71 line(s) · markdown

Sleela-Native — original real-time renderer, physics model & audio

Idea System(TM) / Idea(TM). From Author; distributive. MIT licensed, clean-room original — see PROVENANCE.md.

A modest-but-complete, self-contained real-time renderer for a physical model, written from scratch with no third-party libraries (no GLFW, no GLEW/GLAD, no engine or math libs). It talks directly to open standards (OpenGL + the OS's standard WGL/CGL/EGL context) and provides everything else ourselves.

What it renders

Files

FileRoleBuilt & verified here?
sln_math.hvectors, 4×4 matrices, lookAt/perspective✅
sln_scene.hcamera, moving light, model, vignette, cues✅
sln_audio.{h,cpp}PCM mixer + WAV writer + sink interface✅
sln_demo.cppheadless demo: advances the scene + writes a WAV✅
sln_gl_loader.{h,cpp}our own GL function loader (replaces GLEW/GLAD)compiles ✅ (not run)
sln_render_gl.{h,cpp}OpenGL renderer + our own GLSL (lit model + vignette)compiles ✅ (not run)

Build / run

Model + audio (anywhere, no GPU)

cd idea/sleela-native
make run        # advances the scene, writes build/sleela-native-demo.wav

Verified output: 30-vertex model, orbiting camera + light, and a 3 s stereo 48 kHz WAV of the triggered sound cues.

With the OpenGL renderer (GPU + display)

The renderer needs a current GL context — create one with the platform context layer in ../realtime/idea_canvas_ctx.h (WGL on Windows 10+, CGL on macOS, EGL on Linux), then:

sln::Scene scene; scene.build_default();
sln::GlRenderer r; r.init(scene, width, height);
while (running) { scene.advance(dt); r.render(scene); ctx_present(); }

Link against the OS GL + windowing libraries (e.g. -lopengl32 -lgdi32 on Windows; -framework OpenGL -framework Cocoa on macOS; -lGL -lEGL on Linux).

⚠️ Honest verification status

Built and run in the headless sandbox: the math, the scene model (camera, moving light, vignette params), the audio mixer, and the WAV output.

Compiled but not run here: the OpenGL renderer, the GL loader, and the GLSL — this environment has no GPU, GL driver, or display. They compile cleanly against our own loader; run them on a GPU/display machine to see pixels.