Loading...
Searching...
No Matches
rendererPluginRegistry.h
1//
2// Copyright 2017 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_RENDERER_PLUGIN_REGISTRY_H
8#define PXR_IMAGING_HD_RENDERER_PLUGIN_REGISTRY_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/renderDelegate.h"
14#include "pxr/imaging/hf/pluginRegistry.h"
15
16PXR_NAMESPACE_OPEN_SCOPE
17
22
23class HdRendererPluginRegistry final : public HfPluginRegistry
24{
25public:
29 HD_API
30 static HdRendererPluginRegistry &GetInstance();
31
35 template<typename T, typename... Bases>
36 static void Define();
37
44 HD_API
45 TfToken GetDefaultPluginId(
46 const HdRendererCreateArgsSchema &rendererCreateArgs);
47
54 HD_API
55 HdRendererPluginHandle GetOrCreateRendererPlugin(const TfToken &pluginId);
56
59
67 HD_API
68 HdRendererPlugin *GetRendererPlugin(const TfToken &pluginId);
69
77 HD_API
78 HdPluginRenderDelegateUniqueHandle CreateRenderDelegate(
79 const TfToken &pluginId,
80 const HdRenderSettingsMap &settingsMap = {});
81
83
84private:
85 // Friend required by TfSingleton to access constructor (as it is private).
86 friend class TfSingleton<HdRendererPluginRegistry>;
87
88 void _CollectAdditionalMetadata(
89 const PlugRegistry &plugRegistry, const TfType &pluginType) override;
90
91 // Singleton gets private constructed
92 HdRendererPluginRegistry();
93 ~HdRendererPluginRegistry() override;
94
95 //
98 HdRendererPluginRegistry(const HdRendererPluginRegistry &) = delete;
99 HdRendererPluginRegistry &operator=(const HdRendererPluginRegistry &) = delete;
100};
101
102
103template<typename T, typename... Bases>
104void HdRendererPluginRegistry::Define()
105{
107}
108
109
110PXR_NAMESPACE_CLOSE_SCOPE
111
112#endif // PXR_IMAGING_HD_RENDERER_PLUGIN_REGISTRY_H
A (movable) handle for a render delegate that was created using a a plugin.
Arguments to HdRendererPlugin::IsSupported and CreateRenderer.
A handle for HdRendererPlugin also storing the plugin id.
This class defines a renderer plugin interface for Hydra.
Base class for registering Hydra plugins using the plug mechanism.
static void Define()
Entry point for registering a types implementation.
Defines an interface for registering plugins.
Definition registry.h:319
Manage a single instance of an object (see.
Definition singleton.h:107
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:71
TfType represents a dynamic runtime type.
Definition type.h:48
Manage a single instance of an object.