Graphics Module: - Add platform abstraction layer (GraphicsPlatformInterface) - Add unified renderer entry point (Renderer) - Add D3D12 backend implementation (D3D12Core, D3D12Interface) - Add TestRenderer for multi-window rendering tests Documentation: - Add Graphics渲染架构分析.md - Add D3D12学习Wiki.md - Add changelogs directory with per-commit documentation - Add 20260326-dx12-initial.md for initial framework - Add 20260326-d3d12-foundation.md for Graphics module Fixes: - Resolve header include issues and type redefinition errors
39 lines
742 B
C++
39 lines
742 B
C++
#include "Renderer.h"
|
|
#include "GraphicsPlatformInterface.h"
|
|
#include "Direct3D12/D3D12Interface.h"
|
|
|
|
namespace XEngine::graphics {
|
|
namespace {
|
|
platform_interface gfx{};
|
|
bool
|
|
set_platform_interface(graphics_platform platform)
|
|
{
|
|
switch (platform)
|
|
{
|
|
case graphics_platform::direct3d12:
|
|
d3d12::get_platform_interface(gfx);
|
|
break;
|
|
case graphics_platform::vulkan:
|
|
//vulkan::get_platform_interface(gfx);
|
|
break;
|
|
case graphics_platform::opengl:
|
|
//opengl::get_platform_interface(gfx);
|
|
break;
|
|
default:
|
|
return false;
|
|
}
|
|
return gfx.initialize();
|
|
}
|
|
}// anonymous namespace
|
|
|
|
bool initialize(graphics_platform platform)
|
|
{
|
|
return set_platform_interface(platform);
|
|
}
|
|
|
|
void shutdown()
|
|
{
|
|
gfx.shutdown();
|
|
}
|
|
}// namespace XEngine::graphics
|