Fix RHI format conversion and add debug logging for D3D12 tests
This commit is contained in:
25
engine/src/RHI/RHIScreenshot.cpp
Normal file
25
engine/src/RHI/RHIScreenshot.cpp
Normal 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
|
||||
Reference in New Issue
Block a user