All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dirtyList.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_DIRTY_LIST_H
8#define PXR_IMAGING_HD_DIRTY_LIST_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/version.h"
13#include "pxr/imaging/hd/repr.h"
14#include "pxr/imaging/hd/rprimCollection.h"
15#include "pxr/imaging/hd/types.h"
16
17#include <memory>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21class HdRenderIndex;
22class HdChangeTracker;
23using HdReprSelectorVector = std::vector<HdReprSelector>;
24
87public:
88 HD_API
89 explicit HdDirtyList(HdRenderIndex &index);
90
100 HD_API
101 SdfPathVector const& GetDirtyRprims();
102
105 HD_API
107 TfTokenVector const &tags, HdReprSelectorVector const &reprs);
108
112 _pruneDirtyList = true;
113 }
114
115private:
116 HdChangeTracker & _GetChangeTracker() const;
117 void _UpdateDirtyIdsIfNeeded();
118
119 // Note: Can't use a const ref to the renderIndex because
120 // HdRenderIndex::GetRprimIds() isn't a const member fn.
121 HdRenderIndex &_renderIndex;
122 TfTokenVector _trackedRenderTags;
123 HdReprSelectorVector _trackedReprs;
124 SdfPathVector _dirtyIds;
125
126 unsigned int _sceneStateVersion;
127 unsigned int _rprimIndexVersion;
128 unsigned int _rprimRenderTagVersion;
129 unsigned int _varyingStateVersion;
130
131 bool _rebuildDirtyList;
132 bool _pruneDirtyList;
133};
134
135PXR_NAMESPACE_CLOSE_SCOPE
136
137#endif // PXR_IMAGING_HD_DIRTY_LIST_H
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine.
Definition: changeTracker.h:35
Used for faster iteration of dirty Rprims by the render index.
Definition: dirtyList.h:86
HD_API SdfPathVector const & GetDirtyRprims()
Returns a reference of dirty rprim ids.
void PruneToVaryingRprims()
Sets the flag to prune to dirty list to just the varying Rprims on the next call to GetDirtyRprims.
Definition: dirtyList.h:111
HD_API void UpdateRenderTagsAndReprSelectors(TfTokenVector const &tags, HdReprSelectorVector const &reprs)
Updates the tracked filtering parameters.
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:104
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440