Commit Graph

5 Commits

Author SHA1 Message Date
cae53dca8b Add lighting system with shaders, light structs, and material support 2025-10-29 21:18:17 +01:00
579d5ec483 Add camera system with FPS and Orbit support
Introduce Camera.h/cpp defining abstract Camera, FPSCamera, OrbitCamera.
Update engine.h to include Camera and window size fields.
Implement cameraUpdate in engine.cpp handling mouse movement and key input.
Add framebuffer size and scroll callbacks for viewport resizing and zoom.
Remove legacy loop files (cube, rainbowWindow, rbgTriangle).
Adjust main.cpp formatting.
Update onCreate to load objects with textures and transforms.
Modify onUpdate to use Camera's view/projection matrices instead of hardcoded values.
2025-10-28 13:09:06 +01:00
7e36811c91 ♻️ refactor engine to use Mesh3D with transform support
- Add position, rotation and scale fields to `Mesh3D` and expose them publicly.
- Remove the old `Object3D` struct; `Objects3D` now stores `unique_ptr<Mesh3D>`.
- Implement a new `createObject(name,textures,filepath,position,rotation,scale)` overload that sets transforms after loading the mesh.
- Add a `draw(Mesh3D*)` helper that binds the texture, builds a model matrix and issues `glDrawArrays`.
- Update the rendering loop to use `draw()` instead of the old cube routine.
- Simplify `onCreate`: enable depth test, flip textures, create two objects with proper transforms, set clear color.
- Enable window resizing (`GLFW_RESIZABLE`), change default size to 800×600 in `main.cpp`.
- Clean up includes and remove unused `cube.cpp`; refactor OBJ parsing for robustness.

These changes unify object handling, allow per‑object transformations, simplify the rendering pipeline, improve maintainability, and make the window resizable.
2025-10-25 19:46:49 +02:00
0ffaffc83e ♻️ (engine): refactor object storage to unique_ptr and improve mesh handling
- Add face counter in Mesh3D
- Switch objects map to std::unique_ptr<Mesh3D>
- Update VAO/VBO binding syntax accordingly
- Adjust cube rendering logic and camera position
- Simplify vertex data, load external model instead of hardcoded vertices
- Change main window size to 1000x1000
- Clean up includes and debug prints
2025-10-24 09:49:05 +02:00
11d4aac4ce added the other files 2025-10-15 08:17:32 +02:00