24 #ifndef PXR_USD_IMAGING_USD_IMAGING_UNIT_TEST_HELPER_H
25 #define PXR_USD_IMAGING_USD_IMAGING_UNIT_TEST_HELPER_H
56 , _renderPass(renderPass)
57 , _renderTags(renderTags)
98 , _renderIndex(nullptr)
108 renderTags.push_back(HdRenderTagTokens->geometry);
122 , _renderIndex(nullptr)
140 , _renderIndex(nullptr)
150 renderTags.push_back(HdRenderTagTokens->geometry);
161 , _renderIndex(nullptr)
179 , _renderIndex(nullptr)
184 _Init(usdStage, collection, delegateId, renderTags);
195 std::make_shared<UsdImaging_TestTask>(_geometryPass, _renderTags)
225 UsdStageRefPtr _stage;
228 void _Init(UsdStageRefPtr
const& usdStage,
233 TF_VERIFY(_renderIndex !=
nullptr);
237 _delegate->
Populate(_stage->GetPseudoRoot());
242 _renderTags = renderTags;
248 #endif //PXR_USD_IMAGING_USD_IMAGING_UNIT_TEST_HELPER_H
USDIMAGING_API void Populate(UsdPrim const &rootPrim)
Populates the rootPrim in the HdRenderIndex.
UsdImaging_TestDriver(UsdStageRefPtr const &usdStage, HdRprimCollection const &collection, SdfPath const &delegateId, TfTokenVector const &renderTags)
virtual void Sync(HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits) override
static SDF_API const SdfPath & AbsoluteRootPath()
std::shared_ptr< class HdRenderPass > HdRenderPassSharedPtr
GT_API const UT_StringHolder time
USDIMAGING_API void SetTime(UsdTimeCode time)
GLsizei const GLchar *const * string
void MarkRprimDirty(SdfPath path, HdDirtyBits flag)
Marks an rprim in the RenderIndex as dirty with the given dirty flags.
GLsizei const GLchar *const * path
void SetTime(double time)
std::vector< HdTaskSharedPtr > HdTaskSharedPtrVector
virtual void Prepare(HdTaskContext *ctx, HdRenderIndex *renderIndex) override
virtual const TfTokenVector & GetRenderTags() const override
std::vector< HdDriver * > HdDriverVector
UsdImagingDelegate & GetDelegate()
Returns the underlying delegate for this driver.
UsdImaging_TestDriver(std::string const &usdFilePath)
UsdStageRefPtr const & GetStage()
Returns the populated UsdStage for this driver.
HD_API void MarkRprimDirty(SdfPath const &id, HdDirtyBits bits=AllDirty)
HdRenderIndex & GetRenderIndex()
Returns the RenderIndex owned by this delegate.
std::shared_ptr< HdRenderPass > HdRenderPassSharedPtr
std::vector< TfToken > TfTokenVector
Convenience types.
HD_API void Execute(HdRenderIndex *index, HdTaskSharedPtrVector *tasks)
Execute tasks.
static USD_API UsdStageRefPtr Open(const std::string &filePath, InitialLoadSet load=LoadAll)
std::unordered_map< TfToken, VtValue, TfToken::HashFunctor > HdTaskContext
HdChangeTracker & GetChangeTracker()
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
static HD_API HdRenderIndex * New(HdRenderDelegate *renderDelegate, HdDriverVector const &drivers, const std::string &instanceName=std::string())
UsdImaging_TestDriver(UsdStageRefPtr const &usdStage)
A simple test task that just causes sync processing.
UsdImaging_TestDriver(UsdStageRefPtr const &usdStage, TfToken const &collectionName, TfToken const &reprName, TfTokenVector const &renderTags)
#define PXR_NAMESPACE_CLOSE_SCOPE
UsdImaging_TestDriver(std::string const &usdFilePath, TfToken const &collectionName, TfToken const &reprName, TfTokenVector const &renderTags)
virtual void Execute(HdTaskContext *ctx) override
UsdImaging_TestTask(HdRenderPassSharedPtr const &renderPass, TfTokenVector const &renderTags)