All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
rendererPlugin.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_H
8#define PXR_IMAGING_HD_RENDERER_PLUGIN_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hf/pluginBase.h"
13#include "pxr/imaging/hd/renderDelegate.h"
14
15PXR_NAMESPACE_OPEN_SCOPE
16
17class SdfPath;
18class HdRenderIndex;
20
33public:
34
40 HD_API
42 HdRenderSettingsMap const &settingsMap = {});
43
47 HD_API
49
53 HD_API
54 std::string GetDisplayName() const;
55
64 virtual HdRenderDelegate *CreateRenderDelegate() = 0;
65
74 HD_API
75 virtual HdRenderDelegate *CreateRenderDelegate(
76 HdRenderSettingsMap const& settingsMap);
77
84 virtual void DeleteRenderDelegate(HdRenderDelegate *renderDelegate) = 0;
85
95 virtual bool IsSupported(bool gpuEnabled = true) const = 0;
96
97protected:
98 HdRendererPlugin() = default;
99 HD_API
100 ~HdRendererPlugin() override;
101
102private:
103 // This class doesn't require copy support.
104 HdRendererPlugin(const HdRendererPlugin &) = delete;
105 HdRendererPlugin &operator =(const HdRendererPlugin &) = delete;
106
107};
108
109
110PXR_NAMESPACE_CLOSE_SCOPE
111
112#endif // PXR_IMAGING_HD_RENDERER_PLUGIN_H
A (movable) handle for a render delegate that was created using a a plugin.
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:104
This class defines a renderer plugin interface for Hydra.
HD_API TfToken GetPluginId() const
Look-up plugin id in plugin registry.
virtual void DeleteRenderDelegate(HdRenderDelegate *renderDelegate)=0
Clients should use CreateDelegate since this method will eventually become protected.
HD_API std::string GetDisplayName() const
Look-up display name in plugin registry.
virtual bool IsSupported(bool gpuEnabled=true) const =0
Returns true if this renderer plugin is supported in the running process and false if not.
HD_API HdPluginRenderDelegateUniqueHandle CreateDelegate(HdRenderSettingsMap const &settingsMap={})
Create a render delegate through the plugin and wrap it in a handle that keeps this plugin alive unti...
virtual HD_API HdRenderDelegate * CreateRenderDelegate(HdRenderSettingsMap const &settingsMap)
Clients should use CreateDelegate since this method will eventually become protected.
virtual HdRenderDelegate * CreateRenderDelegate()=0
Clients should use CreateDelegate since this method will eventually become protected,...
Base class for all hydra plugin classes.
Definition: pluginBase.h:23
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71