A real-time physics engine being developed in C++ with OpenGL visualization. Named after the impulse-based constraint solver at the core of its rigid body dynamics.
Currently in early development. The rendering backbone (OpenGL 3.3 context, window management via GLFW, GPU buffer setup) is in place. Physics systems are under active development.
- OpenGL 3.3 core profile renderer
- GLFW window management with input handling
- Window resize support via framebuffer callback
- Rigid Body Dynamics — AABB and circle collision detection, impulse-based resolution, stacking, restitution and friction
- Constraint Solver — Sequential impulse solver for contacts, with support for joints
- Broad-Phase — Spatial partitioning (grid / BVH) for efficient collision culling
- Narrow-Phase — SAT for convex polygons, circle-circle, and AABB overlap tests
- Debug Visualization — Render collision shapes, contact points, normals, and manifolds
- Demo Sandbox — Interactive scene with stacked bodies, falling shapes, and mouse picking
| Library | Version | Purpose |
|---|---|---|
| OpenGL | 3.3 Core | Rendering API |
| GLAD | 0.1.36 | OpenGL function loader |
| GLFW | 3.4 | Window, context, and input |
| GLM | — | Math library (optional, planned) |
All dependencies except GLFW are included in the repository. GLFW 3.4 (64-bit) is expected at C:\glfw-3.4.bin.WIN64\.
- Windows 10+
- Visual Studio 2022 (v143 toolset, Windows SDK 10.0)
- GLFW 3.4 binaries installed at
C:\glfw-3.4.bin.WIN64\
# Open the solution
ImpulseEngine.sln
# Build via Visual Studio (F7) or MSBuild:
msbuild ImpulseEngine.sln /p:Configuration=Debug /p:Platform=x64The executable is output to x64/Debug/ImpulseEngine.exe.
| Key | Action |
|---|---|
| SPACE | Close window |
ImpulseEngine/
├── glad/ # GLAD loader (generated)
│ ├── include/glad/glad.h
│ └── src/glad.c
├── main.cpp # Entry point — render loop & input
├── ImpulseEngine.sln # Visual Studio 2022 solution
├── ImpulseEngine.vcxproj # MSBuild project file
└── README.md
MIT