Engine is a renderer/physics component; it does not create a window, poll events,
or swap buffers. The host application owns the OpenGL context and drives the engine,
so it can use GLFW, Qt, or an ImGui host:
- Create and activate an OpenGL 3.3 context, then initialize GLAD.
- Call
Engine::initialize()once while that context is current. - Add model files with
addStaticModel,addDynamicModel, andaddLight. The engine loads all meshes in the selected glTF scene, applies node transforms, and caches loaded model data. Mesh-level methods are also available for custom procedural assets. - Each frame, translate the host's keyboard state to
Engine::CameraInput, callhandleKeyboardInput,update(deltaTime), andrender(width, height). - Draw the GUI after
render, then let the host swap/present its buffers.
src/main.cpp is the GLFW example host and contains the sample game's asset setup
and spawn-key bindings. A Qt host can use the same engine calls from its
QOpenGLWidget lifecycle without adopting the sample application's GLFW loop.