vulkan i guess
This commit is contained in:
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -11,3 +11,9 @@
|
||||
path = src/dependency/imgui
|
||||
url = https://github.com/ocornut/imgui
|
||||
branch = docking
|
||||
[submodule "src/dependency/--force"]
|
||||
path = src/dependency/--force
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers
|
||||
[submodule "src/dependency/Vulkan-Headers"]
|
||||
path = src/dependency/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers
|
||||
|
||||
@@ -13,10 +13,22 @@ endif()
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
|
||||
|
||||
# Vulkan i guess
|
||||
find_package(Vulkan REQUIRED)
|
||||
|
||||
# Imgui
|
||||
file(GLOB imgui_sources dependency/imgui/*.h dependency/imgui/*.cpp)
|
||||
file(GLOB imgui_backend
|
||||
dependency/imgui/backends/imgui_impl_vulkan.h
|
||||
dependency/imgui/backends/imgui_impl_vulkan.cpp
|
||||
dependency/imgui/backends/imgui_impl_sdl3.h
|
||||
dependency/imgui/backends/imgui_impl_sdl3.cpp)
|
||||
|
||||
# Engine
|
||||
file(GLOB_RECURSE sources_engine engine/*.cpp engine/*.h)
|
||||
add_executable(PuzGameEngine ${sources_engine})
|
||||
add_executable(PuzGameEngine ${sources_engine} ${imgui_sources} ${imgui_backend})
|
||||
set_property(TARGET PuzGameEngine PROPERTY CXX_STANDARD 17)
|
||||
target_include_directories(PuzGameEngine PUBLIC dependency/imgui dependency/Vulkan-Headers/include)
|
||||
#file(COPY ${data} DESTINATION resources)
|
||||
|
||||
#target_compile_options(PuzGameEngine PUBLIC xyz)
|
||||
@@ -25,8 +37,9 @@ set_property(TARGET PuzGameEngine PROPERTY CXX_STANDARD 17)
|
||||
# Game
|
||||
file(GLOB_RECURSE sources_game game/*.cpp game/*.h)
|
||||
file(GLOB source_singleheader dependency/tinygltf/stb_image.h dependency/tinygltf/stb_image_write.h dependency/tinygltf/json.hpp dependency/tinygltf/tiny_gltf.h)
|
||||
add_library(PuzGame SHARED ${sources_game} ${source_singleheader})
|
||||
add_library(PuzGame SHARED ${sources_game} ${source_singleheader} ${imgui_sources})
|
||||
set_property(TARGET PuzGame PROPERTY CXX_STANDARD 17)
|
||||
target_include_directories(PuzGame PUBLIC dependency/imgui)
|
||||
|
||||
# SDL
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/SDL" EXCLUDE_FROM_ALL)
|
||||
@@ -38,5 +51,5 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/bgfx.cmake")
|
||||
|
||||
# Link
|
||||
target_link_libraries(PuzGame bx bimg bgfx)
|
||||
target_link_libraries(PuzGameEngine bx SDL3::SDL3)
|
||||
target_link_libraries(PuzGameEngine bx SDL3::SDL3 Vulkan::Vulkan)
|
||||
set_target_properties(PuzGame PROPERTIES OUTPUT_NAME "PuzGame2")
|
||||
|
||||
1
src/dependency/Vulkan-Headers
Submodule
1
src/dependency/Vulkan-Headers
Submodule
Submodule src/dependency/Vulkan-Headers added at 234c4b7370
@@ -193,7 +193,7 @@ namespace Game
|
||||
SharedData& shared = GetShared();
|
||||
|
||||
bgfx::Init init;
|
||||
init.type = bgfx::RendererType::Direct3D12;
|
||||
init.type = bgfx::RendererType::Vulkan;
|
||||
init.debug = true;
|
||||
init.platformData.nwh = shared.Window.Handle;
|
||||
init.platformData.ndt = nullptr;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user