Skip to content

albin-johansson/glow

Repository files navigation

Glow

CI

A work in progress 3D graphics engine, developed for fun.

Purpose

This project is developed for recreational and educational purposes. The goal is to be able to render nice looking scenes using modern graphics APIs, with a performant and readable code base.

What this project is not

  • A game engine
  • A 3D model editor

Features

  • Written in C++23
  • ECS architecture
  • Support for common 3D model file formats, such as .dae, .fbx, and .obj.
  • OpenGL 4.1.0 backend
  • Vulkan 1.2 backend

Build

This project uses Vcpkg for dependency management. However, you will need to install the Vulkan SDK to build the Vulkan backend. You can verify your Vulkan installation by checking the value of the VULKAN_SDK environment variable. Information on Vcpkg triplets can be found here.

> export VCPKG_ROOT=<path-to-vcpkg>
> mkdir build && cd build
> cmake .. -GNinja \
           -DCMAKE_BUILD_TYPE=<mode> \
           -DVCPKG_TARGET_TRIPLET=<triplet>
> ninja

Usage

Usage: glow [options]
Options:
   --api, -a        'OpenGL' or 'Vulkan', defaults to 'OpenGL' (optional)
   --env, -e        Path to an environment texture to load at startup (optional)
   --models, -m     Space-separated list of model file paths to load at startup (optional)
   --log, -l        Verbosity of log output, valid values are within [0, 6], defaults to 4 (optional)

Some examples are provided below.

# Use default graphics API, and no initial environment texture or models
> ./glow

# Use a specific graphics API 
> ./glow --api Vulkan

# Disable all logging output
> ./glow --log 0

# Load an environment texture and several models
> ./glow --env textures/env.hdr --models models/teapot.dae models/kettle.fbx

Dependencies

See vcpkg.json for the full Vcpkg manifest file.