일단 오늘은 이걸로..
This commit is contained in:
@@ -47,6 +47,14 @@ FetchContent_Declare(
|
||||
)
|
||||
FetchContent_MakeAvailable(ASSIMP)
|
||||
|
||||
FetchContent_Declare(
|
||||
JSONCPP
|
||||
GIT_REPOSITORY "https://github.com/open-source-parsers/jsoncpp.git"
|
||||
GIT_TAG "1.9.6"
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
FetchContent_MakeAvailable(JSONCPP)
|
||||
|
||||
file(GLOB_RECURSE Sources CONFIGURE_DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
|
||||
)
|
||||
@@ -58,6 +66,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Microsoft.GSL::GSL)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE assimp::assimp)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE jsoncpp_static)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ws2_32)
|
||||
@@ -103,4 +112,18 @@ add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
"$<TARGET_FILE_DIR:spdlog>"
|
||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
||||
COMMENT "Copying spdlog library files and symlinks to output directory"
|
||||
)
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"$<TARGET_FILE:jsoncpp_static>"
|
||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
||||
COMMENT "Copying jsoncpp DLL/so to output directory"
|
||||
)
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"$<TARGET_FILE_DIR:jsoncpp_static>"
|
||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>"
|
||||
COMMENT "Copying jsoncpp library files and symlinks to output directory"
|
||||
)
|
||||
@@ -53,10 +53,15 @@ void Tick(veng::Engine& engine, std::float_t delta_time) {
|
||||
if (glfwGetKey(engine.vulkan_graphics->window->GetHandle(), GLFW_KEY_W) ==
|
||||
GLFW_PRESS) {
|
||||
player->linear_acceleration = glm::normalize(forward) * 10.f;
|
||||
player_flame->linear_velocity = player->linear_velocity;
|
||||
player_flame->position = player->position;
|
||||
player_flame->angular_velocity = player->angular_velocity;
|
||||
player_flame->rotation = player->rotation;
|
||||
player_flame->visible = true;
|
||||
|
||||
if (!w_laststate) {
|
||||
player->needsUpdate = true;
|
||||
player_flame->needsUpdate = true;
|
||||
player->updateRedundantCount = 0;
|
||||
w_laststate = true;
|
||||
}
|
||||
@@ -65,6 +70,7 @@ void Tick(veng::Engine& engine, std::float_t delta_time) {
|
||||
player_flame->visible = false;
|
||||
if (w_laststate) {
|
||||
player->needsUpdate = true;
|
||||
player_flame->needsUpdate = true;
|
||||
player->updateRedundantCount = 0;
|
||||
w_laststate = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user