Fix RHI format conversion and add debug logging for D3D12 tests

This commit is contained in:
2026-03-25 17:30:16 +08:00
parent 9c082c72fa
commit 295459067f
10 changed files with 146 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
#include "XCEngine/RHI/RHIScreenshot.h"
#include "XCEngine/RHI/RHIEnums.h"
#include "XCEngine/RHI/D3D12/D3D12Screenshot.h"
#ifdef XCENGINE_SUPPORT_OPENGL
#include "XCEngine/RHI/OpenGL/OpenGLScreenshot.h"
#endif
namespace XCEngine {
namespace RHI {
RHIScreenshot* RHIScreenshot::Create(RHIType type) {
switch (type) {
case RHIType::D3D12:
return new D3D12Screenshot();
#ifdef XCENGINE_SUPPORT_OPENGL
case RHIType::OpenGL:
return new OpenGLScreenshot();
#endif
default:
return nullptr;
}
}
} // namespace RHI
} // namespace XCEngine