Cardinal Engine is an experimental game engine programmed in one month for a project at the Enjmin, the national school of video games. The main goal of the project was to learn about rendering and procedural generation in video games. Cardinal Engine is fully written in C++ with OpenGL 3 and use some third party libraries :

  • Glew
  • Glfw
  • Glm
  • OpenAL
  • OpenVR
  • Bullet3
  • ImGui
  • Google Test

The project is under CMake 3.2 and is compatible (tested) with Microsoft Visual Studio 2017 (CMake support), CLion (tested) and more. The engine is currently compiling on Windows and has a theoretical compatibility with Linux and Mac if the right flags are passed to CMake because the project contains only sources.

You can find here the teaser of the project and here a video of all engine features.


Scene example preview



  • Plugins
  • Independent game loop
  • Message logger
  • Assertion utilities
  • ImGui support
  • Hierarchy and Inspector
    • Inspection of instantiated objects
    • Modification of attributes in real time


  • Virtual Reality
    • OpenVR
    • Working with HTC Vive
    • Custom mirror window
  • Post-processing
    • Post-processing stack
    • Blur (Box blur, Gaussian blur)
    • Kernel (Edge detection, Sharpen)
    • Debug (Depth buffer, Light scattering pass)
    • Utility (Mirror, Negative, Identity)
    • Sepia tone
    • Vignette
    • Depth of field
    • Fog
    • Bloom
    • God rays
    • FXAA
  • Renderer
    • MeshRenderer
    • LineRenderer
    • TextRenderer
    • ParticleRenderer
  • Built-in shaders
    • Unlit / Lit (Color, Texture, Transparent, Line)
    • Particle
    • Text
    • Standard (Diffuse + point lights)
  • Particle system
    • Customisable particle system
    • GPU Instantiation based
  • VBO indexing
  • Lighting
    • Directional light
    • Point light
  • Debug
    • Gizmos (Box, Cone, lights etc.)
    • Lines
    • Rays


  • OpenAL
  • Wav file loading
  • Audio listener
  • Audio source


This section will enumerate all engine-side implemented features.


Because the engine was designed to create procedural voxel worlds, the code of the project has been quickly split into two main parts : Engine and Game. To achieve that, the game part is compiled separately into a plugin that can be registered later and called by the engine.

The first thing to do is to create a class that will extend the engine plugin interface and implements virtual pure methods.



Then to register your plugin into the engine, you have to implement a function called “OnPluginRegistration()”. This function will be called after the engine initialization so it is already safe.



At any time in your code you can log debug messages using the engine built-in log system. There are 4 log levels : User, Info, Warning and Error.



Output example


The engine has 4 types of renderers that extends the renderer interface IRenderer : MeshRenderer, LineRenderer, TextRenderer and ParticleRenderer. Each renderer can be allocated by calling the appropriate function in the Rendering Engine. Calling one of those functions will return a pointer on a initialized renderer ready to be used. The renderer will be autonomous and there is nothing more to do, you can send your vertices, normals and uvs to the renderer and your mesh will be drawn.




It is possible to illuminate the scene with two kinds of lights : Directional, Point. Just like renderers, there is only one function to call.



Output (Gizmos enabled)

Virtual Reality

The engine supports stereoscopic rendering with OpenVR. It allows you to see the world in VR through an HMD (Tested with an HTC Vive). To enable stereoscopic rendering just write the following lines at the beginning of your code.


The first call will initialize VR rendering and start SteamVR. It might fail if SteamVR is not installed or if there is no HMD connected. The engine embeds his own system to mirror the frames that are sent to the HMD before the pass of the SteamVR compositor.


Note : In VR, the post-processing is disabled but there is at least the MSAA (x4). You can watch a short video showing this feature.

Particle system

Cardinal Engine has it own basic particle system GPU instantiation based. So it allows you to deal with a lot of particles at the same time. The only emission shape available is the cone. Particle systems can be created through code and modified with the GUI.



Note : Here is a short video demonstrating the modification of the particle system through the inspector.


At any time, you can request the engine to draw debug information. The engine only supports gizmos for built-in components :

  • Box
  • Ray
  • Line
  • Axis
  • Grid
  • Cone
  • Point Light
  • Directional Light

To enable or disable a gizmo, just call a small function :


Note : You can also enable or disable gizmos directly from the game with the gizmos window.


Copyright © 2018 Vincent STEHLY--CALISTO. All Rights Reserved.

Up ↑