Gleam Engine is a high quality modern 3D game engine written in C++ targeting desktop platforms (Windows and Mac). Designed with modularity and data-oriented principles in mind.
| Platform | ||
|---|---|---|
| ✔️ | - | |
| - | ✔️ |
Follow the instructions below to compile and run the engine from source.
- Install Visual Studio 2022
- Install Git with LFS
- Install CMake
- Clone repo recursively (with LFS)
- Run Win-GenerateProjects.bat
- Open
build/GleamEngine.sln - Compile Editor project (hit F7 or CTRL+Shift+B)
- Run Editor (hit F5 key)
- Install XCode 15 or newer
- Install Git with LFS
- Install CMake
- Install Metal Shader Converter 1.1
- Clone repo recursively (with LFS)
- Run Mac-GenerateProjects.command
- Open
build/GleamEngine.xcodeproj - Switch target to Editor (CMake sets ALL_BUILD as target by default on XCode)
- Compile Editor project (hit Cmd+B)
- Run Editor (hit Cmd+R key)
- Assets/ - Engine-ready asset files used by the engine and editor
- Shaders/ - Precompiled shader binaries
- Engine/ - Engine files
- Source/ - Engine source
- Runtime/ - Runtime source code
- Editor/ - Editor soruce code
- UnitTest/ - Unit tests
- ThirdParty/ - Third-party libraries
- Source/ - Engine source
- Tools/ - Engine tools source code and binaries
Here's a table outlining the recommended naming conventions for Gleam Engine:
| Element | Convention | Example |
|---|---|---|
| Namespaces | PascalCase | Gleam::IRenderer |
| Types (structs, unions) | PascalCase | RenderPassDescriptor, RendererConfig |
| Classes | PascalCase | GraphicsObject, Material |
| Enums | PascalCase | TextureFormat, ProjectionType |
| Functions | PascalCase | CreateMaterial, AddSystem |
| Methods (inside classes) | PascalCase | GetComponent, SetFieldOfView |
| Members | mPascalCase | mPosition, mMaterial |
| Variables (local/member) | camelCase | passData, stagingBuffer |
| Arguments (function/method) | camelCase | entryPoint, entityManager |
| Constants | SCREAMING_SNAKE_CASE | CBV_SRV_HEAP_SIZE, PUSH_CONSTANT_SIZE |
| Macros | SCREAMING_SNAKE_CASE | PLATFORM_WINDOWS, ENABLE_ASSERTS |
Additional Notes:
- Globals are not allowed: Instead, consider using singletons, dependency injection, or configuration files to manage data that needs access from various parts of your code.
Gleam Engine adopts the following conventions for mathematical operations:
- Coordinate System:
- Left-handed: Positive rotations follow the left-hand rule.
- X-right: The positive X-axis points to the right of the screen in the viewport.
- Z-forward: The positive Z-axis points forward (out of the screen) in the viewport.
- Y-up: The positive Y-axis points up in the viewport.
- Matrix Ordering:
- Column-major: Matrices are stored in row-vector column-major order, where elements are accessed by row and then column.
For detailed information on the Gleam Engine's design choices for various parts (e.g. Render Graph, Entity Component System), please refer to the engine design document here.