Skip to content

Commit

Permalink
Working vulkan (#62)
Browse files Browse the repository at this point in the history
* Added clear comments on specific aspects of vulkan abstraction layers, modified header extensions to hpp, including adding in the event-system into this commit

* Submitting bug fixes to the event system and made some changes by removing an update function from the window class that was only used for events into InputPoll::UpdateEvents instead

* Updated cmake build to using cmake utils

* Updated cmake build to using updated cmake utils

* Working Vulkan Rendering Triangle with Better Design

* Working colored triangle with updated shaders

* working of rendering four triangles vertically with the color blue using push constants

* Refactored Swapchain API for utilizing graphic swapchain instead of directly calling vulkan swapchain

* Updated triangles to prettier colors and now got scaling, rotation, and translation matrices working using push constants stil

* Merging big PR to engine3d for work TestApp and Editor application alongside threading and sync update managers

* Getting the renderer to render meshes simplified and got an example basic physics system up and running for testing the renderer's capabilities

* Fixed resolution offset to be dynamic with the windows dimensions

* Working 3D cube with updated renderer

* Updating cmake to utilize a much better working cmake-utils/2.0

* Working EditorScene to test the ECS and custom Scene objects intsead of the ones from the tutorials

* Removed unecessary commented code and added back the rotation to make sure some of the transforms work properly still after these modifications

* Working editor scene that utilizes our scene structure with basic ECS system working.

* Working camera component with the cube object, and added viewport to get a perfect cube rendering added into the renderer

* Camera component works!!

* Working camera rotation using interpolation

---------

Co-authored-by: = <=>
  • Loading branch information
SpinnerX authored Nov 23, 2024
1 parent 3adf7fe commit cd5c380
Show file tree
Hide file tree
Showing 50 changed files with 1,873 additions and 522 deletions.
27 changes: 2 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,6 @@ project(engine3d CXX)
set(CMAKE_CXX_STANDARD 23)
set(ENGINE_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/engine3d)

cmake_minimum_required(VERSION 3.25)
project(engine3d C CXX)

set(CMAKE_CXX_STANDARD 23)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") # works (in creating the compile_commands.json file)

add_subdirectory(Editor)
add_subdirectory(TestApp)
add_subdirectory(src)

# # target_include_directory is setting some private settings for differentiating what internal includes are privates and what should be includes should be exposed to the application-dev
target_include_directories(${PROJECT_NAME} PUBLIC ${JoltPhysics_SOURCE_DIR} ${EnTT_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE engine3d/ engine3d/Core)
target_include_directories(${PROJECT_NAME} PUBLIC ${GLM_INCLUDE_DIR} ./engine3d)

# #Set Compiler definitions
set(is_msvc_cl $<CXX_COMPILER_ID:MSVC>)
set(dev_definitions
$<${is_msvc_cl}:JPH_FLOATING_POINT_EXCEPTIONS_ENABLED>
JPH_PROFILE_ENABLED
JPH_DEBUG_RENDERER
JPH_OBJECT_STREAM
build_library(
DIRECTORIES src Editor TestApp
)

target_compile_definitions(${PROJECT_NAME} PRIVATE ${dev_definitions})
49 changes: 5 additions & 44 deletions Editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,12 @@ project(Editor CXX)
# Editor/Editor.cpp
# )

set(
all_src
build_demos(
SOURCES
Editor/Editor.hpp
Editor/Editor.cpp
)

add_executable(${PROJECT_NAME} ${all_src})

find_package(OpenGL REQUIRED)
find_package(glfw3 REQUIRED)

find_package(Vulkan REQUIRED)
find_package(VulkanHeaders REQUIRED)

if(LINUX)
find_package(VulkanLoader REQUIRED)
endif(LINUX)

# target_include_directories(${PROJECT_NAME} PUBLIC ${ENGINE_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE ../)
find_package(glm REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(imguidocking REQUIRED)
find_package(box2d REQUIRED)
find_package(joltphysics REQUIRED)
find_package(EnTT REQUIRED)


target_link_libraries(
${PROJECT_NAME}
PRIVATE
glfw
${OPENGL_LIBRARIES}
Vulkan::Vulkan
vulkan-headers::vulkan-headers
glm::glm
fmt::fmt
spdlog::spdlog
yaml-cpp::yaml-cpp
imguidocking::imguidocking
box2d::box2d
Jolt::Jolt
EnTT::EnTT
engine3d
Editor/EditorScene.hpp
Editor/EditorScene.cpp
LINK_LIBRARIES engine3d
)

Loading

0 comments on commit cd5c380

Please sign in to comment.