Files
CoopAllTheThings/tools/mock_game/render_backend.cpp
BlackMark 30eccf749d Apply clang-format across the whole tree
Run clang-format (the repo's .clang-format: LLVM base, 120 cols, tabs,
Allman functions) over every source file so the tree is formatter-clean.
Whitespace only -- no behavior change; full x64 + x86 suites pass.

Also set SortIncludes: false in .clang-format. Windows include order is
load-bearing (windows.h must precede tlhelp32.h / mmreg.h / xinput.h /
dinput.h; winsock2.h must precede windows.h), and the default
alphabetical sort reorders tlhelp32.h ahead of windows.h -- a build
break. Leaving order alone keeps the manual, correct grouping.
2026-07-12 11:52:53 +02:00

32 lines
640 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);
}
if (name == "gl" || name == "opengl") {
return create_gl_backend();
}
if (name == "vk" || name == "vulkan") {
return create_vk_backend();
}
return nullptr;
}
} // namespace coop::mock