30 lines
684 B
C++
30 lines
684 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
namespace XCEngine {
|
|
namespace RHI {
|
|
|
|
class OpenGLSwapChain;
|
|
class OpenGLDevice;
|
|
|
|
class OpenGLScreenshot {
|
|
public:
|
|
static bool Capture(OpenGLDevice& device,
|
|
OpenGLSwapChain& swapChain,
|
|
const char* filename);
|
|
|
|
static bool Capture(OpenGLDevice& device,
|
|
OpenGLSwapChain& swapChain,
|
|
const char* filename,
|
|
int width,
|
|
int height);
|
|
|
|
private:
|
|
static bool SavePPM(const char* filename,
|
|
int width, int height);
|
|
};
|
|
|
|
} // namespace RHI
|
|
} // namespace XCEngine
|