This is an attempt to make a simple game engine / renderer using modern OpenGL (4.5) and C++ (23)
- To finally properly learn OpenGL, instead of jumping straight into newer abstractions like wgpu
- As an exercise in writing idiomatic, modern C++, as I mostly write Rust
- GLSL Shader Hotreloading
- Dynamic entity manipulation making use of EnTT
- Support for meshes with multiple materials
- Obj and glTF file formats for asset imports
- Heavy use of ECS paradigms (plugins, systems, resources)
- Use of results (
std::expected) over traditional C++ exceptions
int main() {
auto game = std::make_unique<Game>();
game->addPlugin(DefaultPlugins());
game->addPlugin(plugins::DebugCamController());
game->addSystem(Schedule::Startup, scenes::test::startup);
game->addSystem(Schedule::Update, scenes::test::update);
auto result = game->start();
if (!result.has_value()) {
std::println(stderr, "Failed to start game: {}", result.error());
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}- You must clone the repository with submodules, as some dependencies are submodules.
git clone https://github.com/codebycruz/qun --recurse-submodules-
Install extra dependencies with
vcpkg install -
Build with Ninja in the
/releasedirectory -
Run
/release/qunwith cwd as the/releasedirectory
I recommend doing your configuration via your IDE, I use VSCode.
There are additionally automatic builds via Github Actions you can find here.
| Error | Solution |
|---|---|
libdecor-gtk-WARNING: Failed to initialize GTK. |
Either run the program outside VSCode or force VSCode to use Wayland (code --enable-features=UseOzonePlatform --ozone-platform=wayland) |
