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;
119 };
120
121 // ---------------------------------------------------------------------
124 // ---------------------------------------------------------------------
125
126 USDIMAGINGGL_API
127 UsdImagingGLEngine(const Parameters &params);
128
137 USDIMAGINGGL_API
139 const TfToken& rendererPluginId = TfToken(),
140 bool gpuEnabled = true);
141
142 USDIMAGINGGL_API
143 UsdImagingGLEngine(const SdfPath& rootPath,
144 const SdfPathVector& excludedPaths,
145 const SdfPathVector& invisedPaths = SdfPathVector(),
146 const SdfPath& sceneDelegateID =
148 const HdDriver& driver = HdDriver(),
149 const TfToken& rendererPluginId = TfToken(),
150 bool gpuEnabled = true,
151 bool displayUnloadedPrimsWithBounds = false);
152
153 // Disallow copies
154 UsdImagingGLEngine(const UsdImagingGLEngine&) = delete;
155 UsdImagingGLEngine& operator=(const UsdImagingGLEngine&) = delete;
156
157 USDIMAGINGGL_API
159
161
162 // ---------------------------------------------------------------------
165 // ---------------------------------------------------------------------
166
168 USDIMAGINGGL_API
169 void PrepareBatch(const UsdPrim& root,
170 const UsdImagingGLRenderParams& params);
171 USDIMAGINGGL_API
172 void RenderBatch(const SdfPathVector& paths,
173 const UsdImagingGLRenderParams& params);
174
176 USDIMAGINGGL_API
177 void Render(const UsdPrim& root,
178 const UsdImagingGLRenderParams &params);
179
182 USDIMAGINGGL_API
183 bool IsConverged() const;
184
186
187 // ---------------------------------------------------------------------
190 // ---------------------------------------------------------------------
191
193 USDIMAGINGGL_API
195
197 USDIMAGINGGL_API
198 void SetRootVisibility(bool isVisible);
199
201
202 // ---------------------------------------------------------------------
205 // ---------------------------------------------------------------------
206
209 USDIMAGINGGL_API
210 void SetCameraPath(SdfPath const& id);
211
215 USDIMAGINGGL_API
216 void SetFraming(CameraUtilFraming const& framing);
217
227 USDIMAGINGGL_API
229 const std::pair<bool, CameraUtilConformWindowPolicy> &policy);
230
234 USDIMAGINGGL_API
235 void SetRenderBufferSize(GfVec2i const& size);
236
242 USDIMAGINGGL_API
243 void SetRenderViewport(GfVec4d const& viewport);
244
248 USDIMAGINGGL_API
249 void SetWindowPolicy(CameraUtilConformWindowPolicy policy);
250
255 USDIMAGINGGL_API
256 void SetCameraState(const GfMatrix4d& viewMatrix,
257 const GfMatrix4d& projectionMatrix);
258
260
261 // ---------------------------------------------------------------------
264 // ---------------------------------------------------------------------
265
267 USDIMAGINGGL_API
268 void SetLightingState(GlfSimpleLightingContextPtr const &src);
269
274 USDIMAGINGGL_API
275 void SetLightingState(GlfSimpleLightVector const &lights,
276 GlfSimpleMaterial const &material,
277 GfVec4f const &sceneAmbient);
278
280
281 // ---------------------------------------------------------------------
284 // ---------------------------------------------------------------------
285
289 USDIMAGINGGL_API
290 void SetSelected(SdfPathVector const& paths);
291
294 USDIMAGINGGL_API
296
300 USDIMAGINGGL_API
301 void AddSelected(SdfPath const &path, int instanceIndex);
302
304 USDIMAGINGGL_API
305 void SetSelectionColor(GfVec4f const& color);
306
308
309 // ---------------------------------------------------------------------
312 // ---------------------------------------------------------------------
313
331 USDIMAGINGGL_API
333 const GfMatrix4d &viewMatrix,
334 const GfMatrix4d &projectionMatrix,
335 const UsdPrim& root,
336 const UsdImagingGLRenderParams &params,
337 GfVec3d *outHitPoint,
338 GfVec3d *outHitNormal,
339 SdfPath *outHitPrimPath = NULL,
340 SdfPath *outHitInstancerPath = NULL,
341 int *outHitInstanceIndex = NULL,
342 HdInstancerContext *outInstancerContext = NULL);
343
346 USDIMAGINGGL_API
348 unsigned char const primIdColor[4],
349 unsigned char const instanceIdColor[4],
350 SdfPath *outHitPrimPath = NULL,
351 SdfPath *outHitInstancerPath = NULL,
352 int *outHitInstanceIndex = NULL,
353 HdInstancerContext *outInstancerContext = NULL);
354
356
357 // ---------------------------------------------------------------------
360 // ---------------------------------------------------------------------
361
363 USDIMAGINGGL_API
365
367 USDIMAGINGGL_API
368 static std::string GetRendererDisplayName(TfToken const &id);
369
371 USDIMAGINGGL_API
372 bool GetGPUEnabled() const;
373
375 USDIMAGINGGL_API
377
380 USDIMAGINGGL_API
381 bool SetRendererPlugin(TfToken const &id);
382
384
385 // ---------------------------------------------------------------------
388 // ---------------------------------------------------------------------
389
391 USDIMAGINGGL_API
393
395 USDIMAGINGGL_API
396 bool SetRendererAov(TfToken const& id);
397
399 USDIMAGINGGL_API
401
403 USDIMAGINGGL_API
405
406 // ---------------------------------------------------------------------
409 // ---------------------------------------------------------------------
410
412 USDIMAGINGGL_API
413 UsdImagingGLRendererSettingsList GetRendererSettingsList() const;
414
416 USDIMAGINGGL_API
418
420 USDIMAGINGGL_API
422 VtValue const& value);
423
425
426 // ---------------------------------------------------------------------
430 // ---------------------------------------------------------------------
431
433 USDIMAGINGGL_API
435
437 USDIMAGINGGL_API
438 static SdfPathVector
440
442
443 // ---------------------------------------------------------------------
446 // ---------------------------------------------------------------------
447
451 USDIMAGINGGL_API
452 void SetEnablePresentation(bool enabled);
453
459 USDIMAGINGGL_API
460 void SetPresentationOutput(TfToken const &api, VtValue const &framebuffer);
461
463
464 // ---------------------------------------------------------------------
467 // ---------------------------------------------------------------------
468
472 USDIMAGINGGL_API
473 HdCommandDescriptors GetRendererCommandDescriptors() const;
474
480 USDIMAGINGGL_API
482 const TfToken &command,
483 const HdCommandArgs &args = HdCommandArgs()) const;
484
485 // ---------------------------------------------------------------------
488 // ---------------------------------------------------------------------
489
491 USDIMAGINGGL_API
493
497 USDIMAGINGGL_API
499
503 USDIMAGINGGL_API
505
507 USDIMAGINGGL_API
509
513 USDIMAGINGGL_API
515
519 USDIMAGINGGL_API
521
523
524 // ---------------------------------------------------------------------
527 // ---------------------------------------------------------------------
528
543 USDIMAGINGGL_API
545 TfToken const& ccType,
546 TfToken const& ocioDisplay = {},
547 TfToken const& ocioView = {},
548 TfToken const& ocioColorSpace = {},
549 TfToken const& ocioLook = {});
550
552
554 USDIMAGINGGL_API
556
557 // ---------------------------------------------------------------------
560 // ---------------------------------------------------------------------
561
567 USDIMAGINGGL_API
569
571
572 // ---------------------------------------------------------------------
575 // ---------------------------------------------------------------------
576
579 USDIMAGINGGL_API
581
583
584protected:
585
587 friend class UsdImagingGL_UnitTestGLDrawing;
588
591 USDIMAGINGGL_API
593
594 USDIMAGINGGL_API
595 void _Execute(const UsdImagingGLRenderParams &params,
596 HdTaskSharedPtrVector tasks);
597
598 USDIMAGINGGL_API
599 bool _CanPrepare(const UsdPrim& root);
600 USDIMAGINGGL_API
601 void _PreSetTime(const UsdImagingGLRenderParams& params);
602 USDIMAGINGGL_API
603 void _PostSetTime(const UsdImagingGLRenderParams& params);
604
605 USDIMAGINGGL_API
606 void _PrepareRender(const UsdImagingGLRenderParams& params);
607
608 USDIMAGINGGL_API
609 void _SetActiveRenderSettingsPrimFromStageMetadata(UsdStageWeakPtr stage);
610
611 USDIMAGINGGL_API
612 void _UpdateDomeLightCameraVisibility();
613
614 using BBoxVector = std::vector<GfBBox3d>;
615
616 USDIMAGINGGL_API
617 void _SetBBoxParams(
618 const BBoxVector& bboxes,
619 const GfVec4f& bboxLineColor,
620 float bboxLineDashSize);
621
622 // Create a hydra collection given root paths and render params.
623 // Returns true if the collection was updated.
624 USDIMAGINGGL_API
625 static bool _UpdateHydraCollection(HdRprimCollection *collection,
626 SdfPathVector const& roots,
627 UsdImagingGLRenderParams const& params);
628 USDIMAGINGGL_API
629 static HdxRenderTaskParams _MakeHydraUsdImagingGLRenderParams(
630 UsdImagingGLRenderParams const& params);
631 USDIMAGINGGL_API
632 static void _ComputeRenderTags(UsdImagingGLRenderParams const& params,
633 TfTokenVector *renderTags);
634
635 USDIMAGINGGL_API
636 void _InitializeHgiIfNecessary();
637
638 USDIMAGINGGL_API
639 void _SetRenderDelegateAndRestoreState(
641
642 USDIMAGINGGL_API
643 void _SetRenderDelegate(HdPluginRenderDelegateUniqueHandle &&);
644
645 USDIMAGINGGL_API
646 SdfPath _ComputeControllerPath(const HdPluginRenderDelegateUniqueHandle &);
647
648 USDIMAGINGGL_API
649 static TfToken _GetDefaultRendererPluginId();
650
656 USDIMAGINGGL_API
658
659 USDIMAGINGGL_API
660 HdEngine *_GetHdEngine();
661
662 USDIMAGINGGL_API
663 HdxTaskController *_GetTaskController() const;
664
665 USDIMAGINGGL_API
666 HdSelectionSharedPtr _GetSelection() const;
667
668protected:
669
670 // Note that any of the fields below might become private
671 // in the future and subclasses should use the above getters
672 // to access them instead.
673
674 HgiUniquePtr _hgi;
675 // Similar for HdDriver.
676 HdDriver _hgiDriver;
677
678 VtValue _userFramebuffer;
679
680protected:
681 bool _displayUnloadedPrimsWithBounds;
682 bool _gpuEnabled;
684 std::unique_ptr<HdRenderIndex> _renderIndex;
685
686 SdfPath const _sceneDelegateId;
687
688 std::unique_ptr<HdxTaskController> _taskController;
689
690 HdxSelectionTrackerSharedPtr _selTracker;
691 HdRprimCollection _renderCollection;
692 HdRprimCollection _intersectCollection;
693
694 GlfSimpleLightingContextRefPtr _lightingContextForOpenGLState;
695
696 // Data we want to live across render plugin switches:
697 GfVec4f _selectionColor;
698 bool _domeLightCameraVisibility;
699
700 SdfPath _rootPath;
701 SdfPathVector _excludedPrimPaths;
702 SdfPathVector _invisedPrimPaths;
703 bool _isPopulated;
704
705private:
706 // Registers app-managed scene indices with the scene index plugin registry.
707 // This needs to be called once *before* the render index is constructed.
708 static void _RegisterApplicationSceneIndices();
709
710 // Creates and returns the scene globals scene index. This callback is
711 // registered prior to render index construction and is invoked during
712 // render index construction via
713 // HdSceneIndexPluginRegistry::AppendSceneIndicesForRenderer(..).
714 static HdSceneIndexBaseRefPtr
715 _AppendSceneGlobalsSceneIndexCallback(
716 const std::string &renderInstanceId,
717 const HdSceneIndexBaseRefPtr &inputScene,
718 const HdContainerDataSourceHandle &inputArgs);
719
720 HdSceneIndexBaseRefPtr
721 _AppendOverridesSceneIndices(
722 const HdSceneIndexBaseRefPtr &inputScene);
723
724 UsdImagingGLEngine_Impl::_AppSceneIndicesSharedPtr _appSceneIndices;
725
726 void _DestroyHydraObjects();
727
728 // Note that we'll only ever use one of _sceneIndex/_sceneDelegate
729 // at a time.
730 UsdImagingStageSceneIndexRefPtr _stageSceneIndex;
731 UsdImagingSelectionSceneIndexRefPtr _selectionSceneIndex;
732 UsdImagingRootOverridesSceneIndexRefPtr _rootOverridesSceneIndex;
733 HdsiLegacyDisplayStyleOverrideSceneIndexRefPtr _displayStyleSceneIndex;
734 HdsiPrimTypePruningSceneIndexRefPtr _materialPruningSceneIndex;
735 HdsiPrimTypePruningSceneIndexRefPtr _lightPruningSceneIndex;
736 HdSceneIndexBaseRefPtr _sceneIndex;
737
738 std::unique_ptr<UsdImagingDelegate> _sceneDelegate;
739
740 std::unique_ptr<HdEngine> _engine;
741};
742
743
744PXR_NAMESPACE_CLOSE_SCOPE
745
746#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:291
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:87
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 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 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.
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::pair< bool, 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:442