Skip to content

dmcg310/gl-gfx

Repository files navigation

gl-gfx

A (somewhat) batched, instanced renderer written in OpenGL. Includes ImGui for entity controls, scene loading/saving. A camera system, scene serialisation/deserialisation with TOML, directional and point lighting, and mesh loading with Assimp.

image

Features

  • Batched instanced rendering for efficient drawing
  • Entity-component style scene management
  • Material system with PBR-like properties
  • Point and directional lighting
  • Camera system with mouse/keyboard navigation
  • Scene serialization with TOML
  • ImGui integration for interactive editing

Building the Project

The project uses CMake with presets for easier build configuration.

Prerequisites

  • CMake 3.19 or newer
  • C++20 compatible compiler
  • Git

Setup

Clone the repository and initialize submodules:

git clone https://github.com/yourusername/gl-gfx.git
cd gl-gfx
git submodule update --init --recursive

Building with CMake Presets

Configure debug build

cmake --preset=debug

Build with parallel jobs

cmake --build --preset=debug -j

Configure release build

cmake --preset=release

Build with parallel jobs

cmake --build --preset=release -j

Running the Application

After building, run the application:

Debug build

./build-debug/gl-gfx/gl-gfx

Release build

./build-release/gl-gfx/gl-gfx

Debug vs Release Modes

  • Debug Mode: Includes ImGui panels for entity manipulation, scene editing, and performance metrics
  • Release Mode: UI panels are disabled for better performance in deployed applications

Note: In a debug build toggle between camera and UI modes with tab key.

References

About

OpenGL Renderer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published