Add coop_mock_game: animated, frame-numbered A/V test game (DX11 + DX12)
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>
This commit is contained in:
19
tools/mock_game/render_backend.cpp
Normal file
19
tools/mock_game/render_backend.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "render_backend.hpp"
|
||||
|
||||
namespace coop::mock
|
||||
{
|
||||
|
||||
std::unique_ptr<RenderBackend> RenderBackend::create(const std::string& name)
|
||||
{
|
||||
if (name == "dx11")
|
||||
{
|
||||
return create_dx11_backend();
|
||||
}
|
||||
if (name == "dx12")
|
||||
{
|
||||
return create_dx12_backend();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace coop::mock
|
||||
Reference in New Issue
Block a user