Add render_dx09.cpp (selectable as `dx9ex` / `dx9`): renders the animated pattern with Clear + ColorFill (D3D9's built-in rect fill -- no shaders) and presents through a real D3D9 / D3D9Ex device. Two modes so the two D3D9 capture paths each have a matching game. Smoke-verified: both present frames and exit cleanly. The capture hook + frame-decode test land next. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
497 B
C++
32 lines
497 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();
|
|
}
|
|
if (name == "dx9ex")
|
|
{
|
|
return create_dx9_backend(/*ex=*/true);
|
|
}
|
|
if (name == "dx9")
|
|
{
|
|
return create_dx9_backend(/*ex=*/false);
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace coop::mock
|