WulineRenderer is a C++20 GUI application for rendering 3D parametric surfaces with a software raster path and a real-time OpenGL presentation layer.
It was built specifically as a learning project to deeply understand:
- Real-time OpenGL-driven rendering flow
- Geometric projection and depth ordering
- Lighting and material response in interactive 3D scenes
- Xiaolin Wu's line algorithm for anti-aliased line rasterization in a real UI context
It is intentionally a compact, inspectable graphics codebase rather than a general-purpose rendering engine.
The core motivation was to practice graphics fundamentals by building a full end-to-end viewer: from raw mesh generation and transformation, through rasterization and shading, to an interactive control UI.
This project is intentionally focused on:
- Strong rendering clarity with smooth line output (Wu algorithm + custom raster code paths)
- Performance-aware data flow (projection caching, face sorting, and asynchronous mesh regeneration)
- A polished, responsive interface for experimenting with shape parameters and lighting
- Practical experience with native app packaging and macOS signing/runtime behavior
The file in the repository assets directory demonstrates the current visual direction:
- Native macOS GUI (GLUT + OpenGL)
- Clear separation of responsibilities across
SceneViewModel,SceneController,GuiApplication, andRenderer3D - Parametric surfaces and controls
- Adjustable lighting and beam effects
- Grid overlay and edge highlighting
- Unit-tested core model/controller and geometry behavior
- Native
.apppackaging with icon support (.icns)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWULINE_ENABLE_GUI=ON
cmake --build build -j4cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWULINE_ENABLE_GUI=ON -DWULINE_BUILD_MACOS_BUNDLE=ON
cmake --build build -j4
cmake --build build --target run_native_appDeterministic launch check:
cmake --build build -j4 && cmake --build build --target run_native_app_checkedIf the launch check fails, re-run with:
xattr -cr build/wulinerenderer.appThen launch again.
Production-hardening switches:
-DWULINE_ENABLE_LTO=ONfor release builds (where supported)-DWULINE_ENABLE_SANITIZERS=ONfor Address/Undefined behavior hardening in Debug builds onClang,AppleClang, andGCC
If a newer dependency/toolchain is available in your environment, it is safe to use as long as the system still provides OpenGL/GLUT for the GUI target.
- This is a GUI-first application; the main executable launches the interactive viewer
- Shape presets:
cuboid,pyramid,ellipsoid,parallelogram,klein,projective,roman,boy - Supported startup flags:
--shape <name>,--no-beam,--shape-width,--shape-height,--shape-depth,--light-x,--light-y,--light-z
ctest --test-dir build --output-on-failureSanitized pipeline:
cmake -S . -B build-sanitized -DCMAKE_BUILD_TYPE=Debug -DWULINE_ENABLE_GUI=ON -DWULINE_ENABLE_SANITIZERS=ON
cmake --build build-sanitized -j4
ctest --test-dir build-sanitized --output-on-failureGitHub Actions runs:
- Release GUI builds on
macos-latestandubuntu-latest - Debug sanitized builds on
macos-latestandubuntu-latest
MIT License (c) 2025 Daniel Jake.
See LICENSE.
Created as a graphics learning project focused on OpenGL and Wu line-based rendering.
