1.7 KiB
1.7 KiB
OpenGLScreenshot::Capture
公开方法,详见头文件声明。
该方法在 XCEngine/RHI/OpenGL/OpenGLScreenshot.h 中提供了 3 个重载,当前页面统一汇总这些公开声明。
重载 1: 声明
bool Capture(RHIDevice* device, RHISwapChain* swapChain, const char* filename) override;
参数:
device- 参数语义详见头文件声明。swapChain- 参数语义详见头文件声明。filename- 参数语义详见头文件声明。
返回: bool - 返回值语义详见头文件声明。
重载 2: 声明
static bool Capture(OpenGLDevice& device, OpenGLSwapChain& swapChain, const char* filename);
参数:
device- 参数语义详见头文件声明。swapChain- 参数语义详见头文件声明。filename- 参数语义详见头文件声明。
返回: bool - 返回值语义详见头文件声明。
重载 3: 声明
static bool Capture(OpenGLDevice& device, OpenGLSwapChain& swapChain, const char* filename, int width, int height);
参数:
device- 参数语义详见头文件声明。swapChain- 参数语义详见头文件声明。filename- 参数语义详见头文件声明。width- 参数语义详见头文件声明。height- 参数语义详见头文件声明。
返回: bool - 返回值语义详见头文件声明。
示例:
#include <XCEngine/RHI/OpenGL/OpenGLScreenshot.h>
void Example() {
XCEngine::RHI::OpenGLScreenshot object;
// 根据上下文补齐参数后调用 OpenGLScreenshot::Capture(...)。
(void)object;
}