This guide covers installing dependencies and configuring your environment for developing with the Rift Game Engine.
\htmlonly
graph LR
classDef required fill:#134e3a,stroke:#10b981,color:#e2e8f0
classDef optional fill:#4a3520,stroke:#f59e0b,color:#e2e8f0
subgraph Required["Required Tools"]
CMake["CMake 3.10+"]:::required
Git["Git"]:::required
Compiler["C++23 Compiler"]:::required
end
subgraph Libraries["Required Libraries"]
GLFW["GLFW 3.3+"]:::required
GLM["GLM"]:::required
GLAD["GLAD"]:::required
STB["stb_image"]:::required
end
subgraph Optional["Optional"]
Vulkan["Vulkan SDK"]:::optional
FreeType["FreeType 2"]:::optional
end
\endhtmlonly
Version: 3.10 or higher
| Platform | Installation |
|---|---|
| Windows | Download installer or choco install cmake |
Verify installation:
cmake --versionThe project requires C++23 support.
| Platform | Compiler | Notes |
|---|---|---|
| Windows | Visual Studio 2022+ | Install "Desktop development with C++" workload |
| Library | Purpose | Required |
|---|---|---|
| GLFW | Window creation, input handling | Yes |
| GLM | Mathematics (vectors, matrices) | Yes |
| GLAD | OpenGL function loading | Yes (for OpenGL) |
| stb_image | Image file loading | Yes |
| FreeType | Font rendering | Optional |
| Vulkan SDK | Vulkan graphics API | Optional |
We provide a PowerShell script to automatically download and configure dependencies:
# Open PowerShell in project root
.\setup.ps1This script will:
- Clone GLFW into
external/glfw/ - Download stb_image.h into
external/stb/ - Check for GLM and GLAD (provides instructions if missing)
If the automatic script doesn't work, follow these steps manually:
After setup, your external/ directory should look like:
external/
|-- glfw/
| |-- CMakeLists.txt
| |-- include/
| +-- src/
|-- glad/
| |-- include/
| | |-- glad/
| | | +-- glad.h
| | +-- KHR/
| | +-- khrplatform.h
| +-- src/
| +-- glad.c
|-- glm/
| +-- glm/
| |-- glm.hpp
| +-- ...
+-- stb/
+-- stb_image.h
Clone GLFW into external/glfw/:
git clone https://github.com/glfw/glfw.git external/glfwOr download a release from glfw.org.
Option 1: Git clone
git clone https://github.com/g-truc/glm.git external/glmOption 2: Download release
- Download from GitHub Releases
- Extract so headers are at
external/glm/glm/glm.hpp
GLAD must be generated for your specific OpenGL version:
- Go to GLAD Generator
- Configure:
- Language: C/C++
- Specification: OpenGL
- API gl: Version 4.6
- Profile: Core
- Options: Check "Generate a loader"
- Click Generate
- Download the zip file
- Extract contents to
external/glad/:external/glad/ |-- include/ | |-- glad/ | | +-- glad.h | +-- KHR/ | +-- khrplatform.h +-- src/ +-- glad.c
Download the single-header library using PowerShell:
mkdir external\stb -Force
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/nothings/stb/master/stb_image.h" -OutFile "external\stb\stb_image.h"For Vulkan rendering support:
- Download from LunarG Vulkan SDK
- Run the installer
- Verify installation:
glslangValidator --version
For text rendering support:
FreeType is bundled or can be installed via vcpkg:
vcpkg install freetype:x64-windowsAfter installing dependencies, verify your setup (run in Developer Command Prompt):
:: Check CMake
cmake --version
:: Check compiler
cl
:: Check Vulkan (optional)
vulkaninfo
:: Check GLSL compiler (optional)
glslangValidator --versionCMake cannot find GLFW. Solutions:
- Ensure GLFW is in
external/glfw/ - Check that
external/glfw/CMakeLists.txtexists
CMake cannot find GLM. Solutions:
- Ensure GLM is in
external/glm/ - Check that
external/glm/glm/glm.hppexists
GLAD was not properly set up:
- Regenerate GLAD at glad.dav1d.de
- Ensure files are in
external/glad/include/glad/glad.h - Ensure
external/glad/src/glad.cexists
- Download stb_image.h manually
- Place it in
external/stb/stb_image.h
If you see validation layer warnings:
- Reinstall Vulkan SDK
- Ensure
VK_LAYER_PATHenvironment variable is set - Run
vulkaninfoto check that validation layers are installed
After setting up dependencies:
- Use x64 Native Tools Command Prompt for command-line builds
- Visual Studio 2019+ recommended for IDE development
- PowerShell execution policy may need adjustment for scripts:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Building Guide - Compiling the project
- Architecture - Understanding the codebase