9#ifndef fsCAxmolRenderTextureV3hdr
10#define fsCAxmolRenderTextureV3hdr
17#include <renderer/RenderTexture.h>
18#include <renderer/RenderTexturePass.h>
29 void beginWithClear(
float r,
float g,
float b,
float a,
float depth = 1.0f,
unsigned int stencil = 0);
36 void saveToFileWithResize(
const std::string_view filename,
const std::string_view mask_filename, SaveFileCallbackType callback =
nullptr);
37 void saveRegionToFile(
const std::string_view filename,
const fsRect& pCaptureRect,
const fsPoint& pOutputDimensions, SaveFileCallbackType callback =
nullptr);
39 static fsCAxmolRenderTexture*
create(
int w,
int h, ax::rhi::PixelFormat format, ax::rhi::PixelFormat depthStencilFormat,
bool sharedRenderTarget);
45 ax::RenderTexturePass* passEnsure();
46 void onSaveToFileWithResize(
const std::string_view filename,
const std::string_view mask_filename);
47 void onSaveRegionToFile(
const std::string_view filename,
const fsRect& pCaptureRect,
const fsPoint& pOutputDimensions);
48 ax::Viewport viewportGet()
const;
50 ax::RefPtr<ax::RenderTexturePass> mPass;
51 std::optional<ax::Viewport> mSavedDefaultViewport;
52 SaveFileCallbackType mSaveFileCallback =
nullptr;
Definition fsCAxmolRenderTexture.h:32
void saveToFileWithResize(const std::string_view filename, const std::string_view mask_filename, SaveFileCallbackType callback=nullptr)
void beginWithClear(float r, float g, float b, float a, float depth=1.0f, unsigned int stencil=0)
Definition fsCAxmolRenderTexture.cpp:54
void begin()
Definition fsCAxmolRenderTexture.cpp:43
void end()
Definition fsCAxmolRenderTexture.cpp:69
bool saveToFileAsJPG(std::string_view filename)
static fsCAxmolRenderTexture * create(int w, int h, bool sharedRenderTarget)
void saveRegionToFile(const std::string_view filename, const fsRect &pCaptureRect, const fsPoint &pOutputDimensions, SaveFileCallbackType callback=nullptr)
static fsCAxmolRenderTexture * create(int w, int h, ax::backend::PixelFormat format, ax::backend::PixelFormat depthStencilFormat, bool sharedRenderTarget)
Definition fsCAxmolRenderTexture.cpp:390