7 #ifndef PXR_USD_IMAGING_USD_IMAGING_UNIT_TEST_HELPER_H
8 #define PXR_USD_IMAGING_USD_IMAGING_UNIT_TEST_HELPER_H
39 , _renderPass(renderPass)
40 , _renderTags(renderTags)
81 , _renderIndex(nullptr)
91 renderTags.push_back(HdRenderTagTokens->geometry);
105 , _renderIndex(nullptr)
123 , _renderIndex(nullptr)
133 renderTags.push_back(HdRenderTagTokens->geometry);
144 , _renderIndex(nullptr)
162 , _renderIndex(nullptr)
167 _Init(usdStage, collection, delegateId, renderTags);
178 std::make_shared<UsdImaging_TestTask>(_geometryPass, _renderTags)
208 UsdStageRefPtr _stage;
211 void _Init(UsdStageRefPtr
const& usdStage,
216 TF_VERIFY(_renderIndex !=
nullptr);
220 _delegate->
Populate(_stage->GetPseudoRoot());
225 _renderTags = renderTags;
231 #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)
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
static HD_API HdRenderIndex * New(HdRenderDelegate *renderDelegate, HdDriverVector const &drivers, const std::string &instanceName=std::string(), const std::string &appName=std::string())
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
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)