7#ifndef PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H
8#define PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H
12#include "pxr/imaging/hdx/api.h"
13#include "pxr/imaging/hdx/task.h"
15#include "pxr/imaging/hgi/texture.h"
17PXR_NAMESPACE_OPEN_SCOPE
26 : enableSelectionHighlight(
false)
27 , enableLocateHighlight(
false)
30 , enableOutline(
false)
33 , instanceIdBufferPath()
34 , elementIdBufferPath()
37 bool enableSelectionHighlight;
38 bool enableLocateHighlight;
42 unsigned int outlineRadius;
78 void Execute(HdTaskContext* ctx)
override;
85 HdDirtyBits* dirtyBits)
override;
90 void _ColorizeSelection();
92 GfVec4f _GetColorForMode(
int mode)
const;
96 bool _UpdateParameterBuffer();
108 struct _ParameterBuffer
113 int enableOutline = 0;
117 bool operator==(
const _ParameterBuffer& other)
const {
118 return texelSize == other.texelSize &&
119 enableOutline == other.enableOutline &&
120 radius == other.radius;
129 VtIntArray _selectionOffsets;
135 uint8_t *_outputBuffer;
136 size_t _outputBufferSize;
139 std::unique_ptr<class HdxFullscreenShader> _compositor;
141 _ParameterBuffer _parameterData;
143 bool _pipelineCreated;
148std::ostream& operator<<(std::ostream& out,
157PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 2 float components.
Basic type for a vector of 4 float components.
A render buffer is a handle to a data resource that can be rendered into, such as a 2d image for a dr...
The render index is part of the Hydra 1.0 API and is only used for emulation purposes so that HdScene...
Adapter class providing data exchange with the client scene graph.
A task for taking ID buffer data and turning it into a "selection overlay" that can be composited on ...
bool IsConverged() const override
Hooks for progressive rendering.
HDX_API void _Sync(HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits) override
Sync the render pass resources.
HDX_API void Prepare(HdTaskContext *ctx, HdRenderIndex *renderIndex) override
Prepare the render pass resources.
HDX_API void Execute(HdTaskContext *ctx) override
Execute the task.
Base class for (some) tasks in Hdx that provides common progressive rendering and Hgi functionality.
A path value used to locate objects in layers or scenegraphs.
Input parameters for HdxColorizeSelectionTask.