This commit is contained in:
2026-05-02 15:49:45 +10:00
parent 8b7aa1971e
commit 8d01ea4a3c
12 changed files with 454 additions and 239 deletions

View File

@@ -8,6 +8,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/apps/LoopThroughWithOpenGLCompositing")
set(GPUDIRECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/Blackmagic DeckLink SDK 16.0/Win/Samples/NVIDIA_GPUDirect")
set(SHADER_SLANG_SOURCE "${APP_DIR}/video_effect.slang")
if(NOT EXISTS "${APP_DIR}/LoopThroughWithOpenGLCompositing.cpp")
message(FATAL_ERROR "Imported app sources were not found under ${APP_DIR}")
@@ -32,7 +33,7 @@ add_executable(LoopThroughWithOpenGLCompositing WIN32
"${APP_DIR}/targetver.h"
"${APP_DIR}/VideoFrameTransfer.cpp"
"${APP_DIR}/VideoFrameTransfer.h"
"${APP_DIR}/video_effect.frag"
"${SHADER_SLANG_SOURCE}"
)
target_include_directories(LoopThroughWithOpenGLCompositing PRIVATE
@@ -55,7 +56,10 @@ target_compile_definitions(LoopThroughWithOpenGLCompositing PRIVATE
UNICODE
)
set_source_files_properties("${APP_DIR}/video_effect.frag" PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties(
"${SHADER_SLANG_SOURCE}"
PROPERTIES HEADER_FILE_ONLY TRUE
)
if(MSVC)
target_compile_options(LoopThroughWithOpenGLCompositing PRIVATE /W3)
@@ -65,9 +69,6 @@ add_custom_command(TARGET LoopThroughWithOpenGLCompositing POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${GPUDIRECT_DIR}/bin/x64/dvp.dll"
"$<TARGET_FILE_DIR:LoopThroughWithOpenGLCompositing>/dvp.dll"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${APP_DIR}/video_effect.frag"
"$<TARGET_FILE_DIR:LoopThroughWithOpenGLCompositing>/video_effect.frag"
)
source_group(TREE "${APP_DIR}" FILES
@@ -85,5 +86,5 @@ source_group(TREE "${APP_DIR}" FILES
"${APP_DIR}/targetver.h"
"${APP_DIR}/VideoFrameTransfer.cpp"
"${APP_DIR}/VideoFrameTransfer.h"
"${APP_DIR}/video_effect.frag"
"${SHADER_SLANG_SOURCE}"
)