24#ifndef PXR_USD_IMAGING_USD_APP_UTILS_FRAME_RECORDER_H
25#define PXR_USD_IMAGING_USD_APP_UTILS_FRAME_RECORDER_H
30#include "pxr/usdImaging/usdAppUtils/api.h"
35#include "pxr/usd/usd/timeCode.h"
42PXR_NAMESPACE_OPEN_SCOPE
68 bool gpuEnabled =
true);
96 if (imageWidth == 0u) {
100 _imageWidth = imageWidth;
107 _complexity = complexity;
137 const UsdStagePtr& stage,
140 const std::string& outputImagePath);
151PXR_NAMESPACE_CLOSE_SCOPE
Low-level utilities for informing users of various internal and external diagnostic conditions.
Token for efficient comparison, assignment, and hashing of known strings.
A utility class for recording images of USD stages.
USDAPPUTILS_API UsdAppUtilsFrameRecorder(const TfToken &rendererPluginId=TfToken(), bool gpuEnabled=true)
The rendererPluginId argument indicates the renderer plugin that Hyrda should use.
USDAPPUTILS_API void SetColorCorrectionMode(const TfToken &colorCorrectionMode)
Sets the color correction mode to be used for recording.
void SetImageWidth(const size_t imageWidth)
Sets the width of the recorded image.
bool SetRendererPlugin(const TfToken &id)
Sets the Hydra renderer plugin to be used for recording.
TfToken GetCurrentRendererId() const
Gets the ID of the Hydra renderer plugin that will be used for recording.
void SetComplexity(const float complexity)
Sets the level of refinement complexity.
USDAPPUTILS_API void SetIncludedPurposes(const TfTokenVector &purposes)
Sets the UsdGeomImageable purposes to be used for rendering.
USDAPPUTILS_API bool Record(const UsdStagePtr &stage, const UsdGeomCamera &usdCamera, const UsdTimeCode timeCode, const std::string &outputImagePath)
Records an image and writes the result to outputImagePath.
The UsdImagingGLEngine is the main entry point API for rendering USD scenes.
USDIMAGINGGL_API void SetEnablePresentation(bool enabled)
Enable / disable presenting the render to bound framebuffer.
USDIMAGINGGL_API bool SetRendererPlugin(TfToken const &id)
Set the current render-graph delegate to id.
USDIMAGINGGL_API TfToken GetCurrentRendererId() const
Return the id of the currently used renderer plugin.
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
#define TF_CODING_ERROR(fmt, args)
Issue an internal programming error, but continue execution.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.