Details

  • C++
  • Windows
  • OpenGL 3.X
  • GLFW
  • Forward Rendering
  • Oclussion Culling
  • Lightning
  • PBR
  • Bullet
  • ImGui


This is the first 3D Game engine I have done, written in C++, multithread and using OpenGL. It has been developed by Xavier Rebasa Moll and me in our last year on ESAT.

Rendering

We use a forward rendering to render the scene. Each object is added to a list if it has to be rendered and at the end of the frame, each object of the list will be rendered directly.

Viewport

Lighting and Shadows

Our engine can process up to 64 point lights, 32 spot lights and 8 directional lights. Only directional lights cast shadows. Each one generates a depth texture from the position and orientation of the node holding the point light, then sends that information as a texture2D to the shader to render shadows.

Shadows

Occlusion Culling

We make use of OpenGL queries to use the occlusion culling. If any object to render has at least one visible pixel it will be rendered, else it will be ignored.

Physically based rendering (PBR)

One of the elements that I am most proud of in this engine is the PBR. This means trying to render materials according to their physical properties. It was really hard to learn what it was exactly and understand what the code was doing, because the Rendering Equation is quite heavy and I did not want to just copy paste and see it work.

PBR

Material

External Libraries

  • ImGui

    A User Interface library. Really usefull and easy to use. This is not the first time I have worked with this library, It gives really good results in the projects for debuging purposes.

ImGui

  • Bullet

    A physics library. Really interesting how it works with a private “world” where everything is calculated in another thread and it’s your job to synchronize it with your world.

References to learn how to work with OpenGL