coinconclusive / gaem

game (OpenGL >4.5)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gæm

Tiny experiment with modern OpenGL and C++20.

house with flushed emoji texture

Yes, that is a house with a 😳 texture.

Controls: LMB drag to rotate camera. Left/Right to switch meshes.

Building

Requirements: glm, glfw3, ninja, python ≥3.6, clang ≥15, fmtlib

The project uses ninja with a custom python generator script as it's build system. The build configuration is stored in build.cfg and is read by gen.py to generate the build.ninja file (note: it's in .gitignore).

0. Generate GL3W source and header files

This project uses gl3w as it's opengl loader. It requires a separate build process that can be done only once:

python gl3w_gen.py

1. Generate the ninja files with gen.py

python gen.py

2. Build the project with ninja

ninja

Note: You can do both 1. and 2. at once:

python gen.py && ninja

Ninja also provides some other useful commands:

# generate compilation database for clangd.
ninja -t compdb > compile_commands.json

# delete all the build files.
ninja -t clean

Running

Requirements: Support for OpenGL ≥4.5

Simply run the generated executable:

build/main

Note: You can combine building and running into one command:

python gen.py && ninja && build/main

TODO

Note: in order of importance.

  • Add gltf loading support with cgltf.
  • Add webgpu backend and backend system.
  • Add Dear ImGui or something similar.

About

game (OpenGL >4.5)


Languages

Language:C++ 51.8%Language:C 47.5%Language:Python 0.7%Language:GLSL 0.0%