Add render_dx10.cpp (selectable as `dx10`): composes the animated pattern (background + moving bar + top-left frame-counter block) on the CPU each frame and CopyResource's it into a real D3D10 DXGI swap-chain back buffer (DX10 has no rect-clear; no shaders). Smoke-verified: `coop_mock_game dx10 2` presents frames and exits cleanly. The frame-accurate decode-through-the-hook assertion lands with the DX10 capture commit next. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
358 B
C++
24 lines
358 B
C++
#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();
|
|
}
|
|
if (name == "dx10")
|
|
{
|
|
return create_dx10_backend();
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace coop::mock
|