- 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.
37 lines
1.1 KiB
CMake
37 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
|
|
# Project name
|
|
project(Ps1Engine)
|
|
|
|
# Set C++ standard
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
|
|
# Include directories
|
|
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/obj_loader.cpp
|
|
${CMAKE_SOURCE_DIR}/Engine/input/input.cpp
|
|
${CMAKE_SOURCE_DIR}/Engine/time/time_manager.cpp
|
|
${CMAKE_SOURCE_DIR}/examples/cube.cpp
|
|
)
|
|
|
|
# Executable
|
|
add_executable(Engine ${SOURCES})
|
|
|
|
# Link libraries
|
|
find_package(OpenGL REQUIRED)
|
|
find_package(GLEW REQUIRED)
|
|
find_package(glfw3 REQUIRED)
|
|
|
|
target_link_libraries(Engine OpenGL::GL GLEW::GLEW glfw) |