A lightweight C++/OpenGL real-time engine built from scratch with a focus on physics, performance, and handling many objects in real time.
Pyramid stack |
Terrain + BVH debug |
Physics based tumbler |
Object manipulation |
Object inspector |
Debug visualizations |
opengl_engine (name subject to change) is a personal engine project focused on building core real-time systems end-to-end. It’s primarily a learning + experimentation repository: features evolve quickly, APIs may change, and the main goal is to iterate on design, performance, and debuggability - especially for physics-heavy scenes with lots of objects.
- Platform: Windows
- IDE: Visual Studio (open
opengl_engine.sln) - Recommended: x64 / Release
Dependencies (GLFW/GLAD/GLM/ImGui/stb) are vendored under opengl/Linking/.
- Custom rigid body simulation (
rigid_body,physics,physics_world) - Broad-phase collision management (
broadphase_manager,broadphase_pairs) - BVH acceleration structures, including terrain support (
bvh,bvh_terrain,treetree_query) - Narrow-phase collision detection using SAT (
sat) - Collision manifolds + contact generation with multi-contact support (
collision_manifold) - Sleeping/awake handling to reduce simulation cost in large scenes (integrated in the physics update flow)
- Raycasting utilities (
raycast) - Collider primitives: AABB, OOBB, sphere, triangle (
aabb,oobb,sphere,tri,collider)
- OpenGL renderer responsible for scene drawing (
renderer) - Shader system + built-in GLSL shaders (
shader_manager,default,shadow,skybox, debug shaders) - Mesh loading and asset management (
mesh_loader,mesh_manager,mesh) - Texture handling (
texture_manager) - Lighting and shadow systems (
light,light_manager,shadow_manager) - Debug rendering utilities for visualizing engine state (AABB/OOBB, normals, lines, contact points, etc.)
(aabb_renderer,oobb_renderer,normals_renderer,draw_line,render_contact_points,arrow_renderer, ...)
- Editor UI and integration (
editor_main,imgui_manager) - Panel framework + built-in panels (
panel,panel_manager,inspector_panel,performance_panel,settings_panel) - Viewport rendering infrastructure (
viewport_fbo) - Interaction workflows intended to support fast iteration while developing the engine (inspection + debug visualization + object selection/raycast integration)
MIT (see LICENSE).