Loading...
Searching...
No Matches
sceneIndexPlugin.h
1//
2// Copyright 2022 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_GP_SCENE_INDEX_PLUGIN_H
8#define PXR_IMAGING_HD_GP_SCENE_INDEX_PLUGIN_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hdGp/api.h"
13#include "pxr/imaging/hd/sceneIndexPlugin.h"
14#include "pxr/imaging/hd/sceneIndexPluginRegistry.h"
15
16PXR_NAMESPACE_OPEN_SCOPE
17
18HDGP_API
19extern TfEnvSetting<bool> HDGP_INCLUDE_DEFAULT_RESOLVER;
20
27class HdGpSceneIndexPlugin : public HdSceneIndexPlugin
28{
29public:
30 static const HdSceneIndexPluginRegistry::InsertionPhase
31 GetInsertionPhase()
32 {
33 // XXX Until we have a better way to declare ordering/dependencies b/w
34 // scene index plugins, allow plugins to run before and after this
35 // plugin (i.e., don't use 0).
36 return 2;
37 }
38
39 // Driven by the HDGP_INCLUDE_DEFAULT_RESOLVER env var.
40 HDGP_API
41 static bool IsEnabled();
42
43 HDGP_API
45
46protected:
47 HdSceneIndexBaseRefPtr _AppendSceneIndex(
48 const HdSceneIndexBaseRefPtr &inputScene,
49 const HdContainerDataSourceHandle &inputArgs) override;
50
51 // Utility function for derived classes to "force" append the procedural
52 // resolving scene index because _AppendSceneIndex uses the IsEnabled guard.
53 HdSceneIndexBaseRefPtr _AppendProceduralResolvingSceneIndex(
54 const HdSceneIndexBaseRefPtr &inputScene,
55 const HdContainerDataSourceHandle &inputArgs);
56};
57
58PXR_NAMESPACE_CLOSE_SCOPE
59
60#endif
HdGpSceneIndexPlugin provides HdSceneIndexPluginRegistry access to instantiate HdGpGenerativeProcedur...
Environment setting variable.