25 #ifndef PXR_IMAGING_HD_UTILS_H
26 #define PXR_IMAGING_HD_UTILS_H
38 #include <unordered_map>
90 auto res = idInstanceMap.insert({renderInstanceId, sp});
93 if (
auto handle = wp.lock()) {
98 "An instance with renderInstanceId %s was already "
99 "registered previously.", renderInstanceId.c_str());
102 res.first->second = sp;
109 idInstanceMap.erase(renderInstanceId);
115 const auto it = idInstanceMap.find(
id);
116 if (it != idInstanceMap.end()) {
126 using _IdToInstanceMap = std::unordered_map<std::string, TWeakPtr>;
127 _IdToInstanceMap idInstanceMap;
137 const HdSceneIndexBaseRefPtr &si,
154 const HdSceneIndexBaseRefPtr &si,
161 #endif // PXR_IMAGING_HD_UTILS_H
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(HdSceneIndexBase)
static SDF_API const SdfPath & AbsoluteRootPath()
TSharedPtr GetInstance(std::string const &id)
GLsizei const GLchar *const * string
HD_API CameraUtilConformWindowPolicy ToConformWindowPolicy(const TfToken &token)
std::weak_ptr< T > TWeakPtr
void RegisterInstance(std::string const &renderInstanceId, TSharedPtr const &sp)
HD_API void PrintSceneIndex(std::ostream &out, const HdSceneIndexBaseRefPtr &si, const SdfPath &rootPath=SdfPath::AbsoluteRootPath())
std::shared_ptr< T > TSharedPtr
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
void UnregisterInstance(std::string const &renderInstanceId)
HD_API bool HasActiveRenderSettingsPrim(const HdSceneIndexBaseRefPtr &si, SdfPath *primPath=nullptr)
#define PXR_NAMESPACE_CLOSE_SCOPE