Skip to content

Stateless, typechecked OpenGL 4.2+ graphics library / game engine for C++

License

Notifications You must be signed in to change notification settings

neon64/cpp_game_engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

decb93b · Sep 22, 2020

History

14 Commits
Jul 12, 2020
Jul 12, 2020
Jun 23, 2020
Jul 12, 2020
Jul 13, 2020
Jul 13, 2020
Aug 25, 2020
Jul 9, 2020
Jul 12, 2020
Sep 22, 2020
Jul 13, 2020

Repository files navigation

C++ Game Engine

^ the overexposure on this screenshot suggests I should really implement tonemapping next.

Aims:

Very much a hobby project, am not trying to achieve the best graphics, or world-class performance, or latest features (e.g.: ray-tracing or real-time global illumination).

Instead my aims are as follows:

  • adopt a stateless API which verifies as much as possible at compile-time using templates/C++20 concepts (inspired by projects like Vulkano, glium)
  • leave open the possibility of porting to Vulkan in the future (though beginning with OpenGL 4+ because I don't want to think about manual memory management and synchronisation of Vulkan objects)
  • implement a render-graph system
  • slightly improve upon the graphical features of my previous Java game engine, e.g.: transitioning from forward phong shading -> deferred PBR pipeline

My aims are not:

  • implement game physics from scratch (I will probably just link to Bullet)
  • compete with Unity/Unreal etc... - I don't want to build a level editor or include a scripting API, this will be a (mostly) statically-linked, compiled C++ application.

Why C++?

TLDR: I would have written it in Rust, but I made a conscious decision to use C++ instead, in order to force me to finally learn it.

  1. To learn (modern) C++. I have been liberal with my use of new features from C++11 onwards (variant, optional, span, string_view, move semantics, perhaps concepts in the future).

  2. Low-level control - trying to achieve higher performance than the Java 3D game engine I worked on many years ago.

  3. Ease of interoperability with other libraries

Building

Uses C++ 20 features - so probably need a relatively recent compiler. I've only tried it with GCC 10 on Linux.

Dependencies:

I would love to be lectured about how to do package management properly in C++, as I'm really missing Rust's Cargo package manager at the moment. I installed deps with vcpkg.

  • glfw3 - windowing
  • glm - matrices and maths for OpenGL
  • glslang - for offline shader compilation/verification/introspection
    • installed as a submodule at the moment as the vcpkg version doesn't work for me yet
  • assimp - model-loading
  • fmt - for std::format replacement
  • loguru - a tiny logging library

Todo

About

Stateless, typechecked OpenGL 4.2+ graphics library / game engine for C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages