Files
t5de-renderer/renderer/CMakeLists.txt
T
dhkatzandClaude Opus 5.5 42fc55cb91 Draw the client's scene in the renderer process
The adapter records everything the client draws (state, transforms, lights, fog, textures and buffers) as a command stream, sent in chunks through the shared memory channel, while IMVU's Direct3D renderer still draws the whole view. The renderer process draws it with Diligent, with shaders reproducing IMVU's Direct3D 9 fixed-function setup, over the right half of the 3D view to compare. It skips to the newest frame when it falls behind, and logs its errors and frame times.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 05:52:15 -07:00

41 lines
2.0 KiB
CMake

# t5de-renderer.exe, the 64-bit renderer process, drawing with Diligent Engine.
include(FetchContent)
# Diligent Engine's core, pinned to an exact commit. Only the Direct3D 11 backend for now; the others (Direct3D 12,
# Vulkan for ray tracing and mesh shaders, WebGPU for browsers) are switched on as they're needed.
set(DILIGENT_NO_DIRECT3D12 ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_VULKAN ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_OPENGL ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_WEBGPU ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_ARCHIVER ON CACHE BOOL "" FORCE)
set(DILIGENT_NO_SUPER_RESOLUTION ON CACHE BOOL "" FORCE)
set(DILIGENT_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(DILIGENT_INSTALL_CORE OFF CACHE BOOL "" FORCE)
FetchContent_Declare(DiligentCore
GIT_REPOSITORY https://github.com/DiligentGraphics/DiligentCore.git
GIT_TAG c555e4d26de3f414eaf792fa16c0c24827619b17 # master, 2026-10-27
GIT_SUBMODULES ThirdParty/xxHash
EXCLUDE_FROM_ALL
SYSTEM)
FetchContent_MakeAvailable(DiligentCore)
# Shader sources, embedded in the program (Diligent compiles them at run time): each shaders/<name>.hlsl becomes
# <name>_hlsl.hpp, defining <camelCaseName>Hlsl.
function(t5de_embed_shader file name)
set(T5DE_SHADER_FILE ${file})
set(T5DE_SHADER_NAME ${name})
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/shaders/${file} T5DE_SHADER_SOURCE)
get_filename_component(stem ${file} NAME_WE)
configure_file(shaders/embed.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/generated/${stem}_hlsl.hpp @ONLY)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS shaders/${file})
endfunction()
t5de_embed_shader(fixed_function.hlsl fixedFunctionHlsl)
add_executable(t5de_renderer WIN32 main.cpp scene.cpp)
set_target_properties(t5de_renderer PROPERTIES OUTPUT_NAME t5de-renderer)
target_include_directories(t5de_renderer PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/generated)
target_link_libraries(t5de_renderer PRIVATE t5de::protocol t5de::options Diligent-GraphicsEngineD3D11-static Diligent-Common)
install(TARGETS t5de_renderer RUNTIME DESTINATION .)