Remove kissfft third party library and update OpenGL screenshot
This commit is contained in:
@@ -15,9 +15,15 @@ using namespace XCEngine::Debug;
|
||||
|
||||
namespace XCEngine {
|
||||
namespace RHI {
|
||||
namespace {
|
||||
|
||||
bool SavePPM(const char* filename, int width, int height) {
|
||||
bool OpenGLScreenshot::Capture(OpenGLDevice& device, OpenGLSwapChain& swapChain, const char* filename) {
|
||||
return Capture(device, swapChain, filename, swapChain.GetWidth(), swapChain.GetHeight());
|
||||
}
|
||||
|
||||
bool OpenGLScreenshot::Capture(OpenGLDevice& device, OpenGLSwapChain& swapChain, const char* filename, int width, int height) {
|
||||
(void)device;
|
||||
(void)swapChain;
|
||||
|
||||
unsigned char* pixels = (unsigned char*)malloc(width * height * 3);
|
||||
if (!pixels) {
|
||||
Logger::Get().Error(LogCategory::Rendering, "[OpenGLScreenshot] Failed to allocate pixel buffer");
|
||||
@@ -55,17 +61,5 @@ bool SavePPM(const char* filename, int width, int height) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
bool OpenGLScreenshot::Capture(OpenGLDevice& device, OpenGLSwapChain& swapChain, const char* filename) {
|
||||
return Capture(device, swapChain, filename, swapChain.GetWidth(), swapChain.GetHeight());
|
||||
}
|
||||
|
||||
bool OpenGLScreenshot::Capture(OpenGLDevice& device, OpenGLSwapChain& swapChain, const char* filename, int width, int height) {
|
||||
(void)device;
|
||||
(void)swapChain;
|
||||
return SavePPM(filename, width, height);
|
||||
}
|
||||
|
||||
} // namespace RHI
|
||||
} // namespace XCEngine
|
||||
Reference in New Issue
Block a user