Add the renderer process
The renderer becomes two programs: the adapter (t5deRenderEngine.dll, 32-bit, in IMVU's process) and a 64-bit renderer process (t5de-renderer.exe) drawing with Diligent Engine, fetched with FetchContent and pinned. For now a spike: the adapter starts the renderer process for each engine and signals each frame through a shared memory channel, and the renderer process draws a box into a child window in the client's 3D view. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
0d126574bf
commit
9a7d7d2908
18 files changed
+491
-57
No files matched your search
+28
-25
@@ -5,15 +5,18 @@ project(t5de-renderer
|
||||
DESCRIPTION "A new 3D renderer for the IMVU Classic client"
|
||||
LANGUAGES CXX)
|
||||
|
||||
# The plugin is loaded into IMVU Classic, a 32-bit program built with Visual C++: it must use the same ABI.
|
||||
# Two programs, for two architectures (a preset for each, see CMakePresets.json):
|
||||
# - 32-bit: the adapter, t5deRenderEngine.dll, a renderer plugin loaded into IMVU Classic (a 32-bit Visual C++
|
||||
# program, so it must match its ABI).
|
||||
# - 64-bit: the renderer process, t5de-renderer.exe, which draws.
|
||||
if(NOT MSVC) # cl or clang-cl
|
||||
message(FATAL_ERROR "Build with MSVC or clang-cl: the plugin must match IMVU Classic's Visual C++ ABI.")
|
||||
endif()
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
message(FATAL_ERROR "Build for 32-bit x86 (IMVU Classic is 32-bit): use a CMakePresets.json preset.")
|
||||
message(FATAL_ERROR "Build with MSVC or clang-cl: the adapter must match IMVU Classic's Visual C++ ABI.")
|
||||
endif()
|
||||
|
||||
# The C runtime is linked statically, so the plugin needs nothing installed beside it.
|
||||
# No C++ modules: skip scanning for them.
|
||||
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
|
||||
|
||||
# The C runtime is linked statically, so the programs need nothing installed beside them.
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
# Warnings and conformance for our own targets.
|
||||
@@ -23,25 +26,25 @@ target_compile_features(t5de_options INTERFACE cxx_std_20)
|
||||
target_compile_options(t5de_options INTERFACE /W4 /permissive- /utf-8 /Zc:__cplusplus)
|
||||
target_compile_definitions(t5de_options INTERFACE WIN32_LEAN_AND_MEAN NOMINMAX UNICODE _UNICODE)
|
||||
|
||||
# Our declarations of IMVU's interfaces.
|
||||
add_library(t5de_imvu INTERFACE)
|
||||
add_library(t5de::imvu ALIAS t5de_imvu)
|
||||
target_include_directories(t5de_imvu INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_compile_features(t5de_imvu INTERFACE cxx_std_20)
|
||||
|
||||
# The renderer plugin, t5deRenderEngine.dll.
|
||||
add_library(t5de_render_engine SHARED
|
||||
src/log.cpp
|
||||
src/passthrough_engine.cpp
|
||||
src/plugin.cpp
|
||||
src/plugin.def)
|
||||
set_target_properties(t5de_render_engine PROPERTIES OUTPUT_NAME t5deRenderEngine)
|
||||
target_link_libraries(t5de_render_engine PRIVATE t5de::imvu t5de::options)
|
||||
|
||||
install(TARGETS t5de_render_engine RUNTIME DESTINATION .)
|
||||
# What the adapter and the renderer process share.
|
||||
add_library(t5de_protocol INTERFACE)
|
||||
add_library(t5de::protocol ALIAS t5de_protocol)
|
||||
target_include_directories(t5de_protocol INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_compile_features(t5de_protocol INTERFACE cxx_std_20)
|
||||
|
||||
include(CTest)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
# Our declarations of IMVU's interfaces (32-bit layouts).
|
||||
add_library(t5de_imvu INTERFACE)
|
||||
add_library(t5de::imvu ALIAS t5de_imvu)
|
||||
target_include_directories(t5de_imvu INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_compile_features(t5de_imvu INTERFACE cxx_std_20)
|
||||
|
||||
add_subdirectory(adapter)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
else()
|
||||
add_subdirectory(renderer)
|
||||
endif()
|
||||
Reference in new issue
Block a user