Skip to content

CSHeHu/graphics-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

167 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graphics engine

The program is an OpenGL engine based on the articles by Joey de Vries in https://learnopengl.com/ under the terms of the CC BY-NC 4.0.

It is used for my personal experimentations on computer graphics, shaders and rendering.

image

Features

  • Data-driven scenes from JSON files
  • Scene cycling via assets/scenes/scene_config.json
  • Object behaviors (None, Oscillate, Spin, Fly)
  • Scripted camera routes with keyframes (position + lookAt)
  • Material/shader selection per object
  • Runtime asset sync to build/assets

Dependencies

  • CMake (3.10+)
  • C++17 compiler
  • OpenGL
  • GLFW3
  • GLM
  • FreeType
  • nlohmann/json

Build

mkdir build
cd build
cmake ..
cmake --build .

Run

./build/OpenGLEngine

Controls

  • W/A/S/D: move camera on horizontal plane
  • Q/E: move camera down/up
  • Mouse: look around
  • Mouse wheel: zoom
  • C: toggle scripted/manual camera mode (when keyframes exist)
  • ESC: quit

Scene Configuration

  • Scene registry and cycle: assets/scenes/scene_config.json
  • Scene files: assets/scenes/basic.scene.json, assets/scenes/alternate.scene.json
  • Shaders: assets/shaders/
  • Meshes: assets/meshes/

Asset Loading Notes

  • The executable loads scene JSON, shader files, and mesh files at runtime.
  • Build copies assets into build/assets automatically (copy_assets target).
  • Because runtime file IO is used, the executable currently expects assets to be present next to the build output.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages