3D Playground consists of a library component 3DEngine which holds components to build a graphical 3D application and an executable Graphics Playground which creates a window, loads a scene and connects mouse and keyboard inputs. As the name suggests, this is a playground to experiment with 3D rendering concepts.
The engine uses modern OpenGL 4.1 with GLSL shaders to leverage features of modern graphics cards in order to achieve high realism while maintaining interactive frame rates.
Cross-Platform Support: Builds on Windows, macOS, and Linux using CMake
- Loading of complex scenes and different model / image formats
- Very basic animation capabilities
- Multiple camera models
- Bounding volume hierarchy
- Mouse & keyboard interactivity
- Platform independent
- Supports Wavefront Obj files
- Leverages C++ 17
- Illumination from various light types (directional, spot, point, SH)
- Shadow mapping with PCF
- Multi-texturing
- Environment mapping
- Spherical Harmonics lighting
- CMake 3.20 or higher
- C++17 compatible compiler (Visual Studio 2019+, GCC 9+, Clang 10+)
- vcpkg for dependency management
This project now uses CMake for cross-platform builds and works on:
- Windows (Visual Studio 2019+, MSVC)
- macOS (Clang, Xcode)
- Linux (GCC, Clang)
This project uses vcpkg to manage dependencies.
Required libraries:
- GLFW3 - Window creation and input handling
- glbinding - Type-safe OpenGL bindings
- TinyXML2 - XML parsing
- GLM - OpenGL mathematics
- stb_image - Image loading
Install dependencies:
macOS:
vcpkg install glfw3:x64-osx glbinding:x64-osx glm:x64-osx tinyxml2:x64-osxLinux:
vcpkg install glfw3:x64-linux glbinding:x64-linux glm:x64-linux tinyxml2:x64-linuxWindows:
vcpkg install glfw3:x64-windows glbinding:x64-windows glm:x64-windows tinyxml2:x64-windowsSee BUILD.md for detailed build instructions for each platform.
Quick start (all platforms):
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
cmake --build . --config ReleaseNote: Set the
VCPKG_ROOTenvironment variable to your vcpkg installation path (e.g.,export VCPKG_ROOT=/path/to/vcpkgon macOS/Linux orset VCPKG_ROOT=C:\vcpkgon Windows).
From the project root directory:
macOS/Linux:
./build/bin/"Graphics Playground" [scene.xml]Windows:
build\bin\Release\"Graphics Playground.exe" [scene.xml]If no scene is specified, the application will list available scenes interactively.
- BUILD.md - Build instructions for each platform
- OpenGL 4.1 is supported but deprecated since macOS 10.14 (Mojave)
- You will see deprecation warnings - this is expected
- For long-term macOS support, consider migrating to Metal or SDL3 (see
CROSS_PLATFORM_STRATEGY.md) - Tested on Intel Macs; Apple Silicon may have limited OpenGL support
- Requires OpenGL drivers and X11/Wayland
- Install mesa development libraries:
sudo apt-get install libgl1-mesa-dev
- Fully supported with Visual Studio 2019+
- Legacy .vcxproj files still available for direct VS builds
This project is licensed under the GNU Lesser General Public License version 3. See LICENSE file in the project root
- Rendering artifacts on Intel HD Graphics 4600
- macOS OpenGL deprecation warnings (expected behavior)


