3D graphics engine made with OpenGL & Lua embedded, mostly a learning project
  • C++ 64.7%
  • C 30.1%
  • HTML 4.9%
  • Makefile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-08 01:04:49 +02:00
include Initial commit 2024-12-01 04:57:35 +01:00
lib Jolt physics integration 2024-12-30 21:32:29 +01:00
resources UI Changes 2024-12-30 02:20:17 +01:00
shaders Shading corrections 2024-12-12 17:05:35 +01:00
src UI Changes 2024-12-30 02:20:17 +01:00
.gitignore Add Lua & Sol2, build .app for MacOS 2024-12-10 12:22:43 +01:00
.gitmodules Jolt physics integration 2024-12-30 21:32:29 +01:00
build.bat Add submodules & build scripts 2024-12-30 18:37:55 +01:00
build.sh Add submodules & build scripts 2024-12-30 18:37:55 +01:00
CMakeLists.txt Remove jolt config 2024-12-30 23:39:56 +01:00
README.md Reword status as learning project 2026-07-08 01:04:49 +02:00

3dengine

A 3D engine written in C++ with OpenGL, built around its own editor rather than being a bare rendering library. It has a scene/object model, a camera, mesh/model loading (via Assimp), shaders, and a framebuffer-based viewport, plus embedded Lua scripting (via sol2) for driving object behavior at runtime.

Features

  • OpenGL 3.3 renderer: shader, mesh, model (Assimp-based import), camera, and framebuffer systems, with a scene graph of objects
  • Editor UI (Dear ImGui): menu bar, console window (captures engine/script output), scene hierarchy, viewport rendered into the framebuffer texture, and a script viewer with a syntax-highlighted text editor
  • Project system: create or open a project (.3dproj) from a startup screen; scenes (including camera and object state) are serialized to/from JSON (.3dscene)
  • Embedded Lua scripting: scripts can be attached to objects and get init()/update() lifecycle hooks, an Object API (position, rotation, scale, name) and a vec3 type exposed to Lua, and print() output is captured into the in-editor console
  • Diagnostics window (currently a placeholder)

Status

Mostly a learning project — built on and off in spare time to explore engine architecture, OpenGL and scripting integration. Work in progress - expect rough edges and missing features (e.g. the diagnostics window and some menu items are stubs).

Build

Required to build:

  • GPU that supports OpenGL 3.3
  • cmake (>= 3.10)

To build and run:

Linux/MacOS:

  • ./build.sh

Windows:

  • build.bat

The compiled executable will be in the build directory.

If you're using Visual Studio Code, you have to configure include paths in c_cpp_properties.json as well. (for intellisense to work correctly, doesn't affect compilation)