A basic 3D renderer built using C++ and OpenGL, intended for educational purposes and to explore the core concepts of real-time graphics programming.
- Render textured 3D quads
- Basic camera controls
- Transformations (translation, rotation, scaling)
- Custom GLSL shaders (vertex & fragment)
- Texture loading with stb_image
- Project structured with CMake and modular vendor libraries
- C++
- OpenGL
- GLFW
- GLAD
- stb_image
- GLM
- CMake
simple3DRenderer/
├── src/ # Main application source code
├── vendors/ # External libraries (GLFW, GLAD, stb_image, GLM)
├── CMakeLists.txt # Main CMake build file
└── README.md # You're here!
- CMake ≥ 3.5
- C++ Compiler:
- GCC or Clang (Linux/macOS/WSL)
- MSVC or MinGW (Windows)
- OpenGL-compatible GPU
# Go to repository
cd simple3DRenderer
# Create build directory
mkdir build && cd build
# Configure and build
cmake ..
cmake --build .
# Run the program
./simple3DRendererOn Linux, you may need to install dependencies:
sudo apt install libglfw3-dev libglm-devOn macOS:
brew install glfw glmOpen Developer Command Prompt for VS (or use CMake Tools in VS Code)
Run:
cd simple3DRenderer
cmake -S . -B build -G "Visual Studio 17 2022"
cmake --build build --config ReleaseYou can now run simple3DRenderer.exe from build\Release.
If you use Visual Studio IDE, open build/simple3DRenderer.sln and build from there.
Make sure g++, make, and cmake are in your system PATH.
cd simple3DRenderer
cmake -S . -B build -G "MinGW Makefiles"
cd build
cmake --build .Run the binary:
.\simple3DRenderer.exe