Loading...
Searching...
No Matches
engine.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24
26
27#ifndef PXR_USD_IMAGING_USD_IMAGING_GL_ENGINE_H
28#define PXR_USD_IMAGING_USD_IMAGING_GL_ENGINE_H
29
30#include "pxr/pxr.h"
31#include "pxr/usdImaging/usdImagingGL/api.h"
32#include "pxr/usdImaging/usdImagingGL/version.h"
33#include "pxr/usdImaging/usdImaging/version.h"
34
36#include "pxr/usdImaging/usdImagingGL/rendererSettings.h"
37
38#include "pxr/imaging/cameraUtil/conformWindow.h"
39
40#include "pxr/imaging/hd/driver.h"
41#include "pxr/imaging/hd/engine.h"
42#include "pxr/imaging/hd/rprimCollection.h"
43#include "pxr/imaging/hd/pluginRenderDelegateUniqueHandle.h"
44
45#include "pxr/imaging/hdx/selectionTracker.h"
46#include "pxr/imaging/hdx/renderSetupTask.h"
47
48#include "pxr/imaging/hgi/hgi.h"
49
52
53#include "pxr/imaging/hgi/hgi.h"
54
55#include "pxr/usd/sdf/path.h"
56#include "pxr/usd/usd/timeCode.h"
57
58#include "pxr/base/gf/frustum.h"
60#include "pxr/base/gf/vec4d.h"
61#include "pxr/base/gf/vec4f.h"
62#include "pxr/base/gf/vec4i.h"
63
65
67
68PXR_NAMESPACE_OPEN_SCOPE
69
70class UsdPrim;
71class HdRenderIndex;
72class HdxTaskController;
74
75TF_DECLARE_WEAK_AND_REF_PTRS(GlfSimpleLightingContext);
76TF_DECLARE_REF_PTRS(UsdImagingStageSceneIndex);
83
84using UsdStageWeakPtr = TfWeakPtr<class UsdStage>;
85
86namespace UsdImagingGLEngine_Impl
87{
88 using _AppSceneIndicesSharedPtr = std::shared_ptr<struct _AppSceneIndices>;
89}
90
96{
97public:
100 {
102 SdfPathVector excludedPaths;
103 SdfPathVector invisedPaths;
104 SdfPath sceneDelegateID = SdfPath::AbsoluteRootPath();
115 bool gpuEnabled = true;
123 };
124
125 // ---------------------------------------------------------------------
128 // ---------------------------------------------------------------------
129
130 USDIMAGINGGL_API
131 UsdImagingGLEngine(const Parameters &params);
132
141 USDIMAGINGGL_API
143 const TfToken& rendererPluginId = TfToken(),
144 bool gpuEnabled = true);
145
146 USDIMAGINGGL_API
147 UsdImagingGLEngine(const SdfPath& rootPath,
148 const SdfPathVector& excludedPaths,
149 const SdfPathVector& invisedPaths = SdfPathVector(),
150 const SdfPath& sceneDelegateID =
152 const HdDriver& driver = HdDriver(),
153 const TfToken& rendererPluginId = TfToken(),
154 bool gpuEnabled = true,
155 bool displayUnloadedPrimsWithBounds = false,
156 bool allowAsynchronousSceneProcessing = false);
157
158 // Disallow copies
159 UsdImagingGLEngine(const UsdImagingGLEngine&) = delete;
160 UsdImagingGLEngine& operator=(const UsdImagingGLEngine&) = delete;
161
162 USDIMAGINGGL_API
164
166
167 // ---------------------------------------------------------------------
170 // ---------------------------------------------------------------------
171
173 USDIMAGINGGL_API
174 void PrepareBatch(const UsdPrim& root,
175 const UsdImagingGLRenderParams& params);
176 USDIMAGINGGL_API
177 void RenderBatch(const SdfPathVector& paths,
178 const UsdImagingGLRenderParams& params);
179
181 USDIMAGINGGL_API
182 void Render(const UsdPrim& root,
183 const UsdImagingGLRenderParams &params);
184
187 USDIMAGINGGL_API
188 bool IsConverged() const;
189
191
192 // ---------------------------------------------------------------------
195 // ---------------------------------------------------------------------
196
198 USDIMAGINGGL_API
200
202 USDIMAGINGGL_API
203 void SetRootVisibility(bool isVisible);
204
206
207 // ---------------------------------------------------------------------
210 // ---------------------------------------------------------------------
211
214 USDIMAGINGGL_API
215 void SetCameraPath(SdfPath const& id);
216
220 USDIMAGINGGL_API
221 void SetFraming(CameraUtilFraming const& framing);
222
232 USDIMAGINGGL_API
234 const std::optional<CameraUtilConformWindowPolicy> &policy);
235
239 USDIMAGINGGL_API
240 void SetRenderBufferSize(GfVec2i const& size);
241
247 USDIMAGINGGL_API
248 void SetRenderViewport(GfVec4d const& viewport);
249
253 USDIMAGINGGL_API
254 void SetWindowPolicy(CameraUtilConformWindowPolicy policy);
255
260 USDIMAGINGGL_API
261 void SetCameraState(const GfMatrix4d& viewMatrix,
262 const GfMatrix4d& projectionMatrix);
263
265
266 // ---------------------------------------------------------------------
269 // ---------------------------------------------------------------------
270
272 USDIMAGINGGL_API
273 void SetLightingState(GlfSimpleLightingContextPtr const &src);
274
279 USDIMAGINGGL_API
280 void SetLightingState(GlfSimpleLightVector const &lights,
281 GlfSimpleMaterial const &material,
282 GfVec4f const &sceneAmbient);
283
285
286 // ---------------------------------------------------------------------
289 // ---------------------------------------------------------------------
290
294 USDIMAGINGGL_API
295 void SetSelected(SdfPathVector const& paths);
296
299 USDIMAGINGGL_API
301
305 USDIMAGINGGL_API
306 void AddSelected(SdfPath const &path, int instanceIndex);
307
309 USDIMAGINGGL_API
310 void SetSelectionColor(GfVec4f const& color);
311
313
314 // ---------------------------------------------------------------------
317 // ---------------------------------------------------------------------
318
336 USDIMAGINGGL_API
338 const GfMatrix4d &viewMatrix,
339 const GfMatrix4d &projectionMatrix,
340 const UsdPrim& root,
341 const UsdImagingGLRenderParams &params,
342 GfVec3d *outHitPoint,
343 GfVec3d *outHitNormal,
344 SdfPath *outHitPrimPath = NULL,
345 SdfPath *outHitInstancerPath = NULL,
346 int *outHitInstanceIndex = NULL,
347 HdInstancerContext *outInstancerContext = NULL);
348
351 USDIMAGINGGL_API
353 unsigned char const primIdColor[4],
354 unsigned char const instanceIdColor[4],
355 SdfPath *outHitPrimPath = NULL,
356 SdfPath *outHitInstancerPath = NULL,
357 int *outHitInstanceIndex = NULL,
358 HdInstancerContext *outInstancerContext = NULL);
359
361
362 // ---------------------------------------------------------------------
365 // ---------------------------------------------------------------------
366
368 USDIMAGINGGL_API
370
372 USDIMAGINGGL_API
373 static std::string GetRendererDisplayName(TfToken const &id);
374
376 USDIMAGINGGL_API
377 bool GetGPUEnabled() const;
378
380 USDIMAGINGGL_API
382
385 USDIMAGINGGL_API
386 bool SetRendererPlugin(TfToken const &id);
387
389
390 // ---------------------------------------------------------------------
393 // ---------------------------------------------------------------------
394
396 USDIMAGINGGL_API
398
400 USDIMAGINGGL_API
401 bool SetRendererAov(TfToken const& id);
402
404 USDIMAGINGGL_API
406
408 USDIMAGINGGL_API
410
411 // ---------------------------------------------------------------------
414 // ---------------------------------------------------------------------
415
417 USDIMAGINGGL_API
418 UsdImagingGLRendererSettingsList GetRendererSettingsList() const;
419
421 USDIMAGINGGL_API
423
425 USDIMAGINGGL_API
427 VtValue const& value);
428
430
431 // ---------------------------------------------------------------------
435 // ---------------------------------------------------------------------
436
438 USDIMAGINGGL_API
440
442 USDIMAGINGGL_API
444
446 USDIMAGINGGL_API
447 static SdfPathVector
449
451
452 // ---------------------------------------------------------------------
455 // ---------------------------------------------------------------------
456
460 USDIMAGINGGL_API
461 void SetEnablePresentation(bool enabled);
462
468 USDIMAGINGGL_API
469 void SetPresentationOutput(TfToken const &api, VtValue const &framebuffer);
470
472
473 // ---------------------------------------------------------------------
476 // ---------------------------------------------------------------------
477
481 USDIMAGINGGL_API
482 HdCommandDescriptors GetRendererCommandDescriptors() const;
483
489 USDIMAGINGGL_API
491 const TfToken &command,
492 const HdCommandArgs &args = HdCommandArgs()) const;
493
494 // ---------------------------------------------------------------------
497 // ---------------------------------------------------------------------
498
500 USDIMAGINGGL_API
502
506 USDIMAGINGGL_API
508
512 USDIMAGINGGL_API
514
516 USDIMAGINGGL_API
518
522 USDIMAGINGGL_API
524
528 USDIMAGINGGL_API
530
532
533 // ---------------------------------------------------------------------
536 // ---------------------------------------------------------------------
537
552 USDIMAGINGGL_API
554 TfToken const& ccType,
555 TfToken const& ocioDisplay = {},
556 TfToken const& ocioView = {},
557 TfToken const& ocioColorSpace = {},
558 TfToken const& ocioLook = {});
559
561
563 USDIMAGINGGL_API
565
566 // ---------------------------------------------------------------------
569 // ---------------------------------------------------------------------
570
576 USDIMAGINGGL_API
578
580
581 // ---------------------------------------------------------------------
584 // ---------------------------------------------------------------------
585
588 USDIMAGINGGL_API
590
592
593 // ---------------------------------------------------------------------
596 // ---------------------------------------------------------------------
597
604 USDIMAGINGGL_API
606
608
609protected:
610
612 friend class UsdImagingGL_UnitTestGLDrawing;
613
616 USDIMAGINGGL_API
618
619 USDIMAGINGGL_API
620 void _Execute(const UsdImagingGLRenderParams &params,
621 HdTaskSharedPtrVector tasks);
622
623 USDIMAGINGGL_API
624 bool _CanPrepare(const UsdPrim& root);
625 USDIMAGINGGL_API
626 void _PreSetTime(const UsdImagingGLRenderParams& params);
627 USDIMAGINGGL_API
628 void _PostSetTime(const UsdImagingGLRenderParams& params);
629
630 USDIMAGINGGL_API
631 void _PrepareRender(const UsdImagingGLRenderParams& params);
632
633 USDIMAGINGGL_API
634 void _SetActiveRenderSettingsPrimFromStageMetadata(UsdStageWeakPtr stage);
635
636 USDIMAGINGGL_API
637 void _UpdateDomeLightCameraVisibility();
638
639 using BBoxVector = std::vector<GfBBox3d>;
640
641 USDIMAGINGGL_API
642 void _SetBBoxParams(
643 const BBoxVector& bboxes,
644 const GfVec4f& bboxLineColor,
645 float bboxLineDashSize);
646
647 // Create a hydra collection given root paths and render params.
648 // Returns true if the collection was updated.
649 USDIMAGINGGL_API
650 static bool _UpdateHydraCollection(HdRprimCollection *collection,
651 SdfPathVector const& roots,
652 UsdImagingGLRenderParams const& params);
653 USDIMAGINGGL_API
654 static HdxRenderTaskParams _MakeHydraUsdImagingGLRenderParams(
655 UsdImagingGLRenderParams const& params);
656 USDIMAGINGGL_API
657 static void _ComputeRenderTags(UsdImagingGLRenderParams const& params,
658 TfTokenVector *renderTags);
659
660 USDIMAGINGGL_API
661 void _InitializeHgiIfNecessary();
662
663 USDIMAGINGGL_API
664 void _SetRenderDelegateAndRestoreState(
666
667 USDIMAGINGGL_API
668 void _SetRenderDelegate(HdPluginRenderDelegateUniqueHandle &&);
669
670 USDIMAGINGGL_API
671 SdfPath _ComputeControllerPath(const HdPluginRenderDelegateUniqueHandle &);
672
673 USDIMAGINGGL_API
674 static TfToken _GetDefaultRendererPluginId();
675
681 USDIMAGINGGL_API
683
684 USDIMAGINGGL_API
685 HdEngine *_GetHdEngine();
686
687 USDIMAGINGGL_API
688 HdxTaskController *_GetTaskController() const;
689
690 USDIMAGINGGL_API
691 HdSelectionSharedPtr _GetSelection() const;
692
693protected:
694
695 // Note that any of the fields below might become private
696 // in the future and subclasses should use the above getters
697 // to access them instead.
698
699 HgiUniquePtr _hgi;
700 // Similar for HdDriver.
701 HdDriver _hgiDriver;
702
703 VtValue _userFramebuffer;
704
705protected:
706 bool _displayUnloadedPrimsWithBounds;
707 bool _gpuEnabled;
709 std::unique_ptr<HdRenderIndex> _renderIndex;
710
711 SdfPath const _sceneDelegateId;
712
713 std::unique_ptr<HdxTaskController> _taskController;
714
715 HdxSelectionTrackerSharedPtr _selTracker;
716 HdRprimCollection _renderCollection;
717 HdRprimCollection _intersectCollection;
718
719 GlfSimpleLightingContextRefPtr _lightingContextForOpenGLState;
720
721 // Data we want to live across render plugin switches:
722 GfVec4f _selectionColor;
723 bool _domeLightCameraVisibility;
724
725 SdfPath _rootPath;
726 SdfPathVector _excludedPrimPaths;
727 SdfPathVector _invisedPrimPaths;
728 bool _isPopulated;
729
730private:
731 // Registers app-managed scene indices with the scene index plugin registry.
732 // This needs to be called once *before* the render index is constructed.
733 static void _RegisterApplicationSceneIndices();
734
735 // Creates and returns the scene globals scene index. This callback is
736 // registered prior to render index construction and is invoked during
737 // render index construction via
738 // HdSceneIndexPluginRegistry::AppendSceneIndicesForRenderer(..).
739 static HdSceneIndexBaseRefPtr
740 _AppendSceneGlobalsSceneIndexCallback(
741 const std::string &renderInstanceId,
742 const HdSceneIndexBaseRefPtr &inputScene,
743 const HdContainerDataSourceHandle &inputArgs);
744
745 HdSceneIndexBaseRefPtr
746 _AppendOverridesSceneIndices(
747 const HdSceneIndexBaseRefPtr &inputScene);
748
749 UsdImagingGLEngine_Impl::_AppSceneIndicesSharedPtr _appSceneIndices;
750
751 void _DestroyHydraObjects();
752
753 // Note that we'll only ever use one of _sceneIndex/_sceneDelegate
754 // at a time.
755 UsdImagingStageSceneIndexRefPtr _stageSceneIndex;
756 UsdImagingSelectionSceneIndexRefPtr _selectionSceneIndex;
757 UsdImagingRootOverridesSceneIndexRefPtr _rootOverridesSceneIndex;
758 HdsiLegacyDisplayStyleOverrideSceneIndexRefPtr _displayStyleSceneIndex;
759 HdsiPrimTypePruningSceneIndexRefPtr _materialPruningSceneIndex;
760 HdsiPrimTypePruningSceneIndexRefPtr _lightPruningSceneIndex;
761 HdSceneIndexBaseRefPtr _sceneIndex;
762
763 std::unique_ptr<UsdImagingDelegate> _sceneDelegate;
764
765 std::unique_ptr<HdEngine> _engine;
766
767 bool _allowAsynchronousSceneProcessing = false;
768};
769
770
771PXR_NAMESPACE_CLOSE_SCOPE
772
773#endif // PXR_USD_IMAGING_USD_IMAGING_GL_ENGINE_H
Framing information.
Definition: framing.h:80
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:88
Basic type for a vector of 2 int components.
Definition: vec2i.h:61
Basic type for a vector of 3 double components.
Definition: vec3d.h:63
Basic type for a vector of 4 double components.
Definition: vec4d.h:63
Basic type for a vector of 4 float components.
Definition: vec4f.h:63
HdDriver represents a device object, commonly a render device, that is owned by the application and p...
Definition: driver.h:40
The application-facing entry point top-level entry point for accessing Hydra.
Definition: engine.h:48
A (movable) handle for a render delegate that was created using a a plugin.
A render buffer is a handle to a data resource that can be rendered into, such as a 2d image for a dr...
Definition: renderBuffer.h:50
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Definition: renderIndex.h:121
A named, semantic collection of objects.
Abstract interface to scene data.
Definition: sceneIndex.h:65
A scene index overriding the legacy display style for each prim.
Scene Index that prunes prims of given type (e.g., material) and (optionally) bindings to that prim t...
Scene index that populates a "sceneGlobals" data source as modeled by HdSceneGlobalsSchema and provid...
Hydra Graphics Interface.
Definition: hgi.h:111
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
static SDF_API const SdfPath & AbsoluteRootPath()
The absolute path representing the top of the namespace hierarchy.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
Pointer storage with deletion detection.
Definition: weakPtr.h:145
The primary translation layer between the Hydra (Hd) core and the Usd scene graph.
Definition: delegate.h:84
The UsdImagingGLEngine is the main entry point API for rendering USD scenes.
Definition: engine.h:96
USDIMAGINGGL_API void SetSelectionColor(GfVec4f const &color)
Sets the selection highlighting color.
USDIMAGINGGL_API bool StopRenderer()
Stop the renderer.
USDIMAGINGGL_API void SetRenderBufferSize(GfVec2i const &size)
Set the size of the render buffers baking the AOVs.
USDIMAGINGGL_API bool SetRendererAov(TfToken const &id)
Set the current renderer AOV to id.
USDIMAGINGGL_API UsdImagingDelegate * _GetSceneDelegate() const
Get a direct pointer to the scene delegate.
USDIMAGINGGL_API void SetActiveRenderPassPrimPath(SdfPath const &)
Set active render pass prim to use to drive rendering.
USDIMAGINGGL_API void SetRenderViewport(GfVec4d const &viewport)
Set the viewport to use for rendering as (x,y,w,h), where (x,y) represents the lower left corner of t...
USDIMAGINGGL_API bool DecodeIntersection(unsigned char const primIdColor[4], unsigned char const instanceIdColor[4], SdfPath *outHitPrimPath=NULL, SdfPath *outHitInstancerPath=NULL, int *outHitInstanceIndex=NULL, HdInstancerContext *outInstancerContext=NULL)
Decodes a pick result given hydra prim ID/instance ID (like you'd get from an ID render).
USDIMAGINGGL_API bool RestartRenderer()
Restart the renderer.
USDIMAGINGGL_API Hgi * GetHgi()
Returns the HGI interface.
static USDIMAGINGGL_API TfTokenVector GetRendererPlugins()
Return the vector of available render-graph delegate plugins.
HdDriver driver
An HdDriver, containing the Hgi of your choice, can be optionally passed in during construction.
Definition: engine.h:108
USDIMAGINGGL_API void Render(const UsdPrim &root, const UsdImagingGLRenderParams &params)
Entry point for kicking off a render.
USDIMAGINGGL_API VtValue GetRendererSetting(TfToken const &id) const
Gets a renderer setting's current value.
USDIMAGINGGL_API bool ResumeRenderer()
Resume the renderer.
USDIMAGINGGL_API HdRenderIndex * _GetRenderIndex() const
Returns the render index of the engine, if any.
USDIMAGINGGL_API void SetEnablePresentation(bool enabled)
Enable / disable presenting the render to bound framebuffer.
USDIMAGINGGL_API void SetLightingState(GlfSimpleLightingContextPtr const &src)
Copy lighting state from another lighting context.
USDIMAGINGGL_API bool PauseRenderer()
Pause the renderer.
USDIMAGINGGL_API void SetCameraPath(SdfPath const &id)
Scene camera API Set the scene camera path to use for rendering.
USDIMAGINGGL_API void PrepareBatch(const UsdPrim &root, const UsdImagingGLRenderParams &params)
Support for batched drawing.
USDIMAGINGGL_API void SetRootVisibility(bool isVisible)
Sets the root visibility.
USDIMAGINGGL_API void SetColorCorrectionSettings(TfToken const &ccType, TfToken const &ocioDisplay={}, TfToken const &ocioView={}, TfToken const &ocioColorSpace={}, TfToken const &ocioLook={})
Set ccType to one of the HdxColorCorrectionTokens: {disabled, sRGB, openColorIO}.
USDIMAGINGGL_API void SetLightingState(GlfSimpleLightVector const &lights, GlfSimpleMaterial const &material, GfVec4f const &sceneAmbient)
Set lighting state Derived classes should ensure that passing an empty lights vector disables lightin...
TfToken rendererPluginId
The rendererPluginId argument indicates the renderer plugin that Hydra should use.
Definition: engine.h:112
USDIMAGINGGL_API UsdImagingGLEngine(const HdDriver &driver=HdDriver(), const TfToken &rendererPluginId=TfToken(), bool gpuEnabled=true)
An HdDriver, containing the Hgi of your choice, can be optionally passed in during construction.
USDIMAGINGGL_API TfTokenVector GetRendererAovs() const
Return the vector of available renderer AOV settings.
USDIMAGINGGL_API bool PollForAsynchronousUpdates() const
If allowAsynchronousSceneProcessing is true within the Parameters provided to the UsdImagingGLEngine ...
USDIMAGINGGL_API bool IsStopRendererSupported() const
Query the renderer as to whether it supports stopping and restarting.
USDIMAGINGGL_API bool IsConverged() const
Returns true if the resulting image is fully converged.
USDIMAGINGGL_API void SetCameraState(const GfMatrix4d &viewMatrix, const GfMatrix4d &projectionMatrix)
Free camera API Set camera framing state directly (without pointing to a camera on the USD stage).
bool displayUnloadedPrimsWithBounds
displayUnloadedPrimsWithBounds draws bounding boxes for unloaded prims if they have extents/extentsHi...
Definition: engine.h:118
USDIMAGINGGL_API HdRenderBuffer * GetAovRenderBuffer(TfToken const &name) const
Returns the AOV render buffer for the given token.
USDIMAGINGGL_API bool InvokeRendererCommand(const TfToken &command, const HdCommandArgs &args=HdCommandArgs()) const
Invokes command on the active render delegate.
USDIMAGINGGL_API bool SetRendererPlugin(TfToken const &id)
Set the current render-graph delegate to id.
static USDIMAGINGGL_API bool IsColorCorrectionCapable()
Returns true if the platform is color correction capable.
static USDIMAGINGGL_API SdfPathVector GetAvailableRenderSettingsPrimPaths(UsdPrim const &root)
Utility method to query available render settings prims.
USDIMAGINGGL_API HgiTextureHandle GetAovTexture(TfToken const &name) const
Returns an AOV texture handle for the given token.
USDIMAGINGGL_API bool IsPauseRendererSupported() const
Query the renderer as to whether it supports pausing and resuming.
static USDIMAGINGGL_API std::string GetRendererDisplayName(TfToken const &id)
Return the user-friendly description of a renderer plugin.
USDIMAGINGGL_API void SetRendererSetting(TfToken const &id, VtValue const &value)
Sets a renderer setting's value.
bool allowAsynchronousSceneProcessing
allowAsynchronousSceneProcessing indicates to constructed hydra scene indices that asynchronous proce...
Definition: engine.h:122
USDIMAGINGGL_API void SetPresentationOutput(TfToken const &api, VtValue const &framebuffer)
The destination API (e.g., OpenGL, see hgiInterop for details) and framebuffer that the AOVs are pres...
USDIMAGINGGL_API UsdImagingGLRendererSettingsList GetRendererSettingsList() const
Returns the list of renderer settings.
USDIMAGINGGL_API TfToken GetCurrentRendererId() const
Return the id of the currently used renderer plugin.
USDIMAGINGGL_API void SetOverrideWindowPolicy(const std::optional< CameraUtilConformWindowPolicy > &policy)
Specifies whether to force a window policy when conforming the frustum of the camera to match the dis...
USDIMAGINGGL_API void ClearSelected()
Clear the list of prim paths that should be included in selection highlighting.
USDIMAGINGGL_API VtDictionary GetRenderStats() const
Returns render statistics.
USDIMAGINGGL_API HdCommandDescriptors GetRendererCommandDescriptors() const
Return command deescriptors for commands supported by the active render delegate.
USDIMAGINGGL_API void SetSelected(SdfPathVector const &paths)
Sets (replaces) the list of prim paths that should be included in selection highlighting.
bool gpuEnabled
The gpuEnabled argument determines if this instance will allow Hydra to use the GPU to produce images...
Definition: engine.h:115
USDIMAGINGGL_API void SetFraming(CameraUtilFraming const &framing)
Determines how the filmback of the camera is mapped into the pixels of the render buffer and what pix...
USDIMAGINGGL_API void SetWindowPolicy(CameraUtilConformWindowPolicy policy)
Set the window policy to use.
USDIMAGINGGL_API bool TestIntersection(const GfMatrix4d &viewMatrix, const GfMatrix4d &projectionMatrix, const UsdPrim &root, const UsdImagingGLRenderParams &params, GfVec3d *outHitPoint, GfVec3d *outHitNormal, SdfPath *outHitPrimPath=NULL, SdfPath *outHitInstancerPath=NULL, int *outHitInstanceIndex=NULL, HdInstancerContext *outInstancerContext=NULL)
Finds closest point of intersection with a frustum by rendering.
USDIMAGINGGL_API void AddSelected(SdfPath const &path, int instanceIndex)
Add a path with instanceIndex to the list of prim paths that should be included in selection highligh...
USDIMAGINGGL_API void SetRootTransform(GfMatrix4d const &xf)
Sets the root transform.
USDIMAGINGGL_API void SetActiveRenderSettingsPrimPath(SdfPath const &)
Set active render settings prim to use to drive rendering.
USDIMAGINGGL_API bool GetGPUEnabled() const
Return if the GPU is enabled and can be used for any rendering tasks.
Parameters to construct UsdImagingGLEngine.
Definition: engine.h:100
Used as an arguments class for various methods in UsdImagingGLEngine.
Definition: renderParams.h:74
Overrides some data sources on the root prim.
A simple scene index adding HdSelectionsSchema to all prims selected with AddSelection.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:134
A map with string keys and VtValue values.
Definition: dictionary.h:60
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:164
Standard pointer typedefs.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:75
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:89
RenderTask parameters (renderpass state).
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:457