/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/Core/Interfaces/FrameCaptureInterface.h
40 строк
2 KB
Jan Krassnigg
Improved code documentation: Core, Texture, Utilities (#1666)
23 сен 2025, 09:56
Не верифицирован
23 сен 2025, 09:56
a9f6901
Код
Авторство
О чём код?
#pragma once #include <Core/System/Window.h> /// \brief Interface for frame capture functionality to save rendered frames to disk. /// /// Provides methods to capture frames from windows and save them as image files. /// The interface allows starting and ending frame captures, configuring output paths, /// and retrieving information about the last successful capture. class ezFrameCaptureInterface { public: /// \brief Determine if a singleton implementing this interface has successfully been initialized and frame capture functionality is available. virtual bool IsInitialized() const = 0; /// \brief Specify the absolute base file path for storing frame captures. For the final output file name, an identifier and/or /// frame or capture number will be appended. /// Note that the final output file name is determined by the frame capture implementation. Use \ref GetLastAbsCaptureFileName() /// for retrieving the actual absolute file name of the most recently written capture file. virtual void SetAbsCaptureFilePathTemplate(ezStringView sFilePathTemplate) = 0; /// \brief Retrieve the absolute file path for storing frame captures. virtual ezStringView GetAbsCaptureFilePathTemplate() const = 0; /// \brief Start capturing a frame rendered to the given window. virtual void StartFrameCapture(ezWindowHandle hWnd) = 0; /// \brief Determine if a frame capture is currently in progress. virtual bool IsFrameCapturing() const = 0; /// \brief End the current frame capture and write the result to the path given by \ref SetAbsCaptureFilePathTemplate. virtual void EndFrameCaptureAndWriteOutput(ezWindowHandle hWnd) = 0; /// \brief End the current frame capture and discard the corresponding data, saving processing time and file I/O in the process. virtual void EndFrameCaptureAndDiscardResult(ezWindowHandle hWnd) = 0; /// \brief Retrieve the absolute file name of the last successful frame capture. Returns EZ_FAILURE if no successful capture has /// been performed. virtual ezResult GetLastAbsCaptureFileName(ezStringBuilder& out_sFileName) const = 0; };