Refactor renderer and input handling; add OBJ loader and math utilities

- Updated renderer.h to replace Vec3 and Vec2 structs with Math namespace equivalents.
- Introduced Texture struct to manage texture properties.
- Modified Triangle struct to use Texture instead of GLuint for texture handling.
- Removed deprecated matrix functions and replaced them with Math namespace methods.
- Implemented InputManager class for better input handling, including key and mouse state tracking.
- Added ObjLoader class to load OBJ files and associated textures, with MTL file parsing.
- Created math utilities for fixed-point arithmetic and vector/matrix operations.
- Added time management class for frame timing and delta time calculations.
This commit is contained in:
ExilProductions
2025-05-02 15:46:45 +02:00
parent 6d308d3279
commit 475a1d606a
18 changed files with 982 additions and 308 deletions

View File

@@ -11,13 +11,18 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
include_directories(${CMAKE_SOURCE_DIR}/Engine)
include_directories(${CMAKE_SOURCE_DIR}/Engine/renderer)
include_directories(${CMAKE_SOURCE_DIR}/Engine/loader)
include_directories(${CMAKE_SOURCE_DIR}/Engine/input)
include_directories(${CMAKE_SOURCE_DIR}/Engine/math)
include_directories(${CMAKE_SOURCE_DIR}/Engine/time)
include_directories(${CMAKE_SOURCE_DIR}/examples)
include_directories(${CMAKE_SOURCE_DIR}/external/stb)
# Source files
set(SOURCES
${CMAKE_SOURCE_DIR}/Engine/renderer/renderer.cpp
${CMAKE_SOURCE_DIR}/Engine/loader/mesh.cpp
${CMAKE_SOURCE_DIR}/Engine/loader/obj_loader.cpp
${CMAKE_SOURCE_DIR}/Engine/input/input.cpp
${CMAKE_SOURCE_DIR}/Engine/time/time_manager.cpp
${CMAKE_SOURCE_DIR}/examples/cube.cpp
)