A tiny test "game" for exercising the capture/audio/hook paths. Opens a normal window and renders an animated pattern -- moving bar + per-frame background so motion (and dropped frames) are obvious -- with a top-left block whose RGB encodes the exact frame number, so a capture test can decode it and detect dropped / duplicated / stale frames. Selectable backend (dx11 / dx12 today), behind a RenderBackend interface so OpenGL/Vulkan can be added. With audio args it also plays a configurable WASAPI tone (shared ToneSource), so it's a full A/V source with a window (unlike coop_tone). coop_mock_game.exe [dx11|dx12] [seconds] [rate] [channels] [bits] [pcm|float] Milestone 1 of the mock-game roadmap item (the stress-test suite follows). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
732 B
CMake
17 lines
732 B
CMake
# CoopMockGame -- a tiny test "game" with an animated, frame-numbered render (DX11/DX12)
|
|
# and a configurable WASAPI tone, used by the capture/audio/hook stress tests. Not shipped.
|
|
add_executable(coop_mock_game
|
|
main.cpp
|
|
render_backend.cpp
|
|
render_dx11.cpp
|
|
render_dx12.cpp)
|
|
|
|
# Reuses the shared ToneSource (also used by coop_tone + the audio hook self-test).
|
|
target_include_directories(coop_mock_game PRIVATE ${CMAKE_SOURCE_DIR}/tools/audio_tone)
|
|
|
|
target_link_libraries(coop_mock_game PRIVATE d3d11 d3d12 dxgi ole32)
|
|
set_target_properties(coop_mock_game PROPERTIES OUTPUT_NAME "coop_mock_game")
|
|
|
|
# Test fixture -> stage next to the tests (alongside coop_tone), not in the deployable root.
|
|
coop_output_subdir(tests coop_mock_game)
|