HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
25 /// \file usdImagingGL/engine.h
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"
34 
37 
39 
40 #include "pxr/imaging/hd/driver.h"
41 #include "pxr/imaging/hd/engine.h"
44 
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"
59 #include "pxr/base/gf/matrix4d.h"
60 #include "pxr/base/gf/vec4d.h"
61 #include "pxr/base/gf/vec4f.h"
62 #include "pxr/base/gf/vec4i.h"
63 
64 #include "pxr/base/vt/dictionary.h"
65 
67 
69 
70 class UsdPrim;
71 class HdRenderIndex;
72 class HdxTaskController;
73 class UsdImagingDelegate;
74 class UsdImagingGLLegacyEngine;
75 
77 
78 /// \class UsdImagingGLEngine
79 ///
80 /// The UsdImagingGLEngine is the main entry point API for rendering USD scenes.
81 ///
83 {
84 public:
85 
86  // ---------------------------------------------------------------------
87  /// \name Global State
88  /// @{
89  // ---------------------------------------------------------------------
90 
91  /// Returns true if Hydra is enabled for GL drawing.
93  static bool IsHydraEnabled();
94 
95  /// @}
96 
97  // ---------------------------------------------------------------------
98  /// \name Construction
99  /// @{
100  // ---------------------------------------------------------------------
101 
102  /// A HdDriver, containing the Hgi of your choice, can be optionally passed
103  /// in during construction. This can be helpful if you application creates
104  /// multiple UsdImagingGLEngine that wish to use the same HdDriver / Hgi.
106  UsdImagingGLEngine(const HdDriver& driver = HdDriver());
107 
109  UsdImagingGLEngine(const SdfPath& rootPath,
110  const SdfPathVector& excludedPaths,
111  const SdfPathVector& invisedPaths=SdfPathVector(),
112  const SdfPath& sceneDelegateID =
114  const HdDriver& driver = HdDriver());
115 
116  // Disallow copies
117  UsdImagingGLEngine(const UsdImagingGLEngine&) = delete;
118  UsdImagingGLEngine& operator=(const UsdImagingGLEngine&) = delete;
119 
122 
123  /// @}
124 
125  // ---------------------------------------------------------------------
126  /// \name Rendering
127  /// @{
128  // ---------------------------------------------------------------------
129 
130  /// Support for batched drawing
132  void PrepareBatch(const UsdPrim& root,
135  void RenderBatch(const SdfPathVector& paths,
136  const UsdImagingGLRenderParams& params);
137 
138  /// Entry point for kicking off a render
140  void Render(const UsdPrim& root,
141  const UsdImagingGLRenderParams &params);
142 
143  /// Returns true if the resulting image is fully converged.
144  /// (otherwise, caller may need to call Render() again to refine the result)
146  bool IsConverged() const;
147 
148  /// @}
149 
150  // ---------------------------------------------------------------------
151  /// \name Root Transform and Visibility
152  /// @{
153  // ---------------------------------------------------------------------
154 
155  /// Sets the root transform.
157  void SetRootTransform(GfMatrix4d const& xf);
158 
159  /// Sets the root visibility.
161  void SetRootVisibility(bool isVisible);
162 
163  /// @}
164 
165  // ---------------------------------------------------------------------
166  /// \name Camera State
167  /// @{
168  // ---------------------------------------------------------------------
169 
170  /// Scene camera API
171  /// Set the scene camera path to use for rendering.
173  void SetCameraPath(SdfPath const& id);
174 
175  /// Determines how the filmback of the camera is mapped into
176  /// the pixels of the render buffer and what pixels of the render
177  /// buffer will be rendered into.
179  void SetFraming(CameraUtilFraming const& framing);
180 
181  /// Specifies whether to force a window policy when conforming
182  /// the frustum of the camera to match the display window of
183  /// the camera framing.
184  ///
185  /// If set to {false, ...}, the window policy of the specified camera
186  /// will be used.
187  ///
188  /// Note: std::pair<bool, ...> is used instead of std::optional<...>
189  /// because the latter is only available in C++17 or later.
192  const std::pair<bool, CameraUtilConformWindowPolicy> &policy);
193 
194  /// Set the size of the render buffers baking the AOVs.
195  /// GUI applications should set this to the size of the window.
196  ///
198  void SetRenderBufferSize(GfVec2i const& size);
199 
200  /// Set the viewport to use for rendering as (x,y,w,h), where (x,y)
201  /// represents the lower left corner of the viewport rectangle, and (w,h)
202  /// is the width and height of the viewport in pixels.
203  ///
204  /// \deprecated Use SetFraming and SetRenderBufferSize instead.
206  void SetRenderViewport(GfVec4d const& viewport);
207 
208  /// Set the window policy to use.
209  /// XXX: This is currently used for scene cameras set via SetCameraPath.
210  /// See comment in SetCameraState for the free cam.
213 
214  /// Free camera API
215  /// Set camera framing state directly (without pointing to a camera on the
216  /// USD stage). The projection matrix is expected to be pre-adjusted for the
217  /// window policy.
219  void SetCameraState(const GfMatrix4d& viewMatrix,
220  const GfMatrix4d& projectionMatrix);
221 
222  /// Helper function to extract camera and viewport state from opengl and
223  /// then call SetCameraState and SetRenderViewport
226 
227  /// @}
228 
229  // ---------------------------------------------------------------------
230  /// \name Light State
231  /// @{
232  // ---------------------------------------------------------------------
233 
234  /// Helper function to extract lighting state from opengl and then
235  /// call SetLights.
238 
239  /// Copy lighting state from another lighting context.
241  void SetLightingState(GlfSimpleLightingContextPtr const &src);
242 
243  /// Set lighting state
244  /// Derived classes should ensure that passing an empty lights
245  /// vector disables lighting.
246  /// \param lights is the set of lights to use, or empty to disable lighting.
248  void SetLightingState(GlfSimpleLightVector const &lights,
249  GlfSimpleMaterial const &material,
250  GfVec4f const &sceneAmbient);
251 
252  /// @}
253 
254  // ---------------------------------------------------------------------
255  /// \name Selection Highlighting
256  /// @{
257  // ---------------------------------------------------------------------
258 
259  /// Sets (replaces) the list of prim paths that should be included in
260  /// selection highlighting. These paths may include root paths which will
261  /// be expanded internally.
263  void SetSelected(SdfPathVector const& paths);
264 
265  /// Clear the list of prim paths that should be included in selection
266  /// highlighting.
268  void ClearSelected();
269 
270  /// Add a path with instanceIndex to the list of prim paths that should be
271  /// included in selection highlighting. UsdImagingDelegate::ALL_INSTANCES
272  /// can be used for highlighting all instances if path is an instancer.
274  void AddSelected(SdfPath const &path, int instanceIndex);
275 
276  /// Sets the selection highlighting color.
278  void SetSelectionColor(GfVec4f const& color);
279 
280  /// @}
281 
282  // ---------------------------------------------------------------------
283  /// \name Picking
284  /// @{
285  // ---------------------------------------------------------------------
286 
287  /// Finds closest point of intersection with a frustum by rendering.
288  ///
289  /// This method uses a PickRender and a customized depth buffer to find an
290  /// approximate point of intersection by rendering. This is less accurate
291  /// than implicit methods or rendering with GL_SELECT, but leverages any
292  /// data already cached in the renderer.
293  ///
294  /// Returns whether a hit occurred and if so, \p outHitPoint will contain
295  /// the intersection point in world space (i.e. \p projectionMatrix and
296  /// \p viewMatrix factored back out of the result), and \p outHitNormal
297  /// will contain the world space normal at that point.
298  ///
299  /// \p outHitPrimPath will point to the gprim selected by the pick.
300  /// \p outHitInstancerPath will point to the point instancer (if applicable)
301  /// of that gprim. For nested instancing, outHitInstancerPath points to
302  /// the closest instancer.
303  ///
305  bool TestIntersection(
306  const GfMatrix4d &viewMatrix,
307  const GfMatrix4d &projectionMatrix,
308  const UsdPrim& root,
309  const UsdImagingGLRenderParams &params,
310  GfVec3d *outHitPoint,
311  GfVec3d *outHitNormal,
312  SdfPath *outHitPrimPath = NULL,
313  SdfPath *outHitInstancerPath = NULL,
314  int *outHitInstanceIndex = NULL,
315  HdInstancerContext *outInstancerContext = NULL);
316 
317  /// Decodes a pick result given hydra prim ID/instance ID (like you'd get
318  /// from an ID render).
320  bool DecodeIntersection(
321  unsigned char const primIdColor[4],
322  unsigned char const instanceIdColor[4],
323  SdfPath *outHitPrimPath = NULL,
324  SdfPath *outHitInstancerPath = NULL,
325  int *outHitInstanceIndex = NULL,
326  HdInstancerContext *outInstancerContext = NULL);
327 
328  /// @}
329 
330  // ---------------------------------------------------------------------
331  /// \name Renderer Plugin Management
332  /// @{
333  // ---------------------------------------------------------------------
334 
335  /// Return the vector of available render-graph delegate plugins.
338 
339  /// Return the user-friendly description of a renderer plugin.
341  static std::string GetRendererDisplayName(TfToken const &id);
342 
343  /// Return the id of the currently used renderer plugin.
346 
347  /// Set the current render-graph delegate to \p id.
348  /// the plugin will be loaded if it's not yet.
350  bool SetRendererPlugin(TfToken const &id);
351 
352  /// @}
353 
354  // ---------------------------------------------------------------------
355  /// \name AOVs and Renderer Settings
356  /// @{
357  // ---------------------------------------------------------------------
358 
359  /// Return the vector of available renderer AOV settings.
362 
363  /// Set the current renderer AOV to \p id.
365  bool SetRendererAov(TfToken const& id);
366 
367  /// Returns an AOV texture handle for the given token.
370 
371  /// Returns the list of renderer settings.
374 
375  /// Gets a renderer setting's current value.
377  VtValue GetRendererSetting(TfToken const& id) const;
378 
379  /// Sets a renderer setting's value.
381  void SetRendererSetting(TfToken const& id,
382  VtValue const& value);
383 
384  /// Enable / disable presenting the render to bound framebuffer.
385  /// An application may choose to manage the AOVs that are rendered into
386  /// itself and skip the engine's presentation.
388  void SetEnablePresentation(bool enabled);
389 
390  /// The destination API (e.g., OpenGL, see hgiInterop for details) and
391  /// framebuffer that the AOVs are presented into. The framebuffer
392  /// is a VtValue that encoding a framebuffer in a destination API
393  /// specific way.
394  /// E.g., a uint32_t (aka GLuint) for framebuffer object for OpenGL.
396  void SetPresentationOutput(TfToken const &api, VtValue const &framebuffer);
397 
398  /// @}
399 
400  // ---------------------------------------------------------------------
401  /// \name Renderer Command API
402  /// @{
403  // ---------------------------------------------------------------------
404 
405  /// Return command deescriptors for commands supported by the active
406  /// render delegate.
407  ///
410 
411  /// Invokes command on the active render delegate. If successful, returns
412  /// \c true, returns \c false otherwise. Note that the command will not
413  /// succeeed if it is not among those returned by
414  /// GetRendererCommandDescriptors() for the same active render delegate.
415  ///
418  const TfToken &command,
419  const HdCommandArgs &args = HdCommandArgs()) const;
420 
421  // ---------------------------------------------------------------------
422  /// \name Control of background rendering threads.
423  /// @{
424  // ---------------------------------------------------------------------
425 
426  /// Query the renderer as to whether it supports pausing and resuming.
428  bool IsPauseRendererSupported() const;
429 
430  /// Pause the renderer.
431  ///
432  /// Returns \c true if successful.
434  bool PauseRenderer();
435 
436  /// Resume the renderer.
437  ///
438  /// Returns \c true if successful.
440  bool ResumeRenderer();
441 
442  /// Query the renderer as to whether it supports stopping and restarting.
444  bool IsStopRendererSupported() const;
445 
446  /// Stop the renderer.
447  ///
448  /// Returns \c true if successful.
450  bool StopRenderer();
451 
452  /// Restart the renderer.
453  ///
454  /// Returns \c true if successful.
456  bool RestartRenderer();
457 
458  /// @}
459 
460  // ---------------------------------------------------------------------
461  /// \name Color Correction
462  /// @{
463  // ---------------------------------------------------------------------
464 
465  /// Set \p id to one of the HdxColorCorrectionTokens.
468  TfToken const& id);
469 
470  /// @}
471 
472  /// Returns true if the platform is color correction capable.
474  static bool IsColorCorrectionCapable();
475 
476  // ---------------------------------------------------------------------
477  /// \name Render Statistics
478  /// @{
479  // ---------------------------------------------------------------------
480 
481  /// Returns render statistics.
482  ///
483  /// The contents of the dictionary will depend on the current render
484  /// delegate.
485  ///
488 
489  /// @}
490 
491  // ---------------------------------------------------------------------
492  /// \name HGI
493  /// @{
494  // ---------------------------------------------------------------------
495 
496  /// Returns the HGI interface.
497  ///
499  Hgi* GetHgi();
500 
501  /// @}
502 
503 protected:
504 
505  /// Open some protected methods for whitebox testing.
507 
508  /// Returns the render index of the engine, if any. This is only used for
509  /// whitebox testing.
512 
514  void _Execute(const UsdImagingGLRenderParams &params,
515  HdTaskSharedPtrVector tasks);
516 
518  bool _CanPrepare(const UsdPrim& root);
520  void _PreSetTime(const UsdImagingGLRenderParams& params);
522  void _PostSetTime(const UsdImagingGLRenderParams& params);
523 
525  void _PrepareRender(const UsdImagingGLRenderParams& params);
526 
527  // Create a hydra collection given root paths and render params.
528  // Returns true if the collection was updated.
530  static bool _UpdateHydraCollection(HdRprimCollection *collection,
531  SdfPathVector const& roots,
532  UsdImagingGLRenderParams const& params);
535  UsdImagingGLRenderParams const& params);
537  static void _ComputeRenderTags(UsdImagingGLRenderParams const& params,
538  TfTokenVector *renderTags);
539 
542 
546 
549 
552 
555 
558 
561 
564 
566  bool _IsUsingLegacyImpl() const;
567 
570 
571 protected:
572 
573 // private:
574  // Note that any of the fields below might become private
575  // in the future and subclasses should use the above getters
576  // to access them instead.
577 
579  // Similar for HdDriver.
581 
583 
584 protected:
586  std::unique_ptr<HdRenderIndex> _renderIndex;
587 
589 
590  std::unique_ptr<HdxTaskController> _taskController;
591 
595 
596  GlfSimpleLightingContextRefPtr _lightingContextForOpenGLState;
597 
598  // Data we want to live across render plugin switches:
600 
605 
606  // An implementation of much of the engine functionality that doesn't
607  // invoke any of the advanced Hydra features. It is kept around for
608  // backwards compatibility and may one day be deprecated. Most of the
609  // time we expect this to be null. When it is not null, none of the other
610  // member variables of this class are used.
611  std::unique_ptr<UsdImagingGLLegacyEngine> _legacyImpl;
612 
613 private:
614  void _DestroyHydraObjects();
615 
616  std::unique_ptr<UsdImagingDelegate> _sceneDelegate;
617  std::unique_ptr<HdEngine> _engine;
618 };
619 
620 
622 
623 #endif // PXR_USD_IMAGING_USD_IMAGING_GL_ENGINE_H
USDIMAGINGGL_API void SetRenderViewport(GfVec4d const &viewport)
USDIMAGINGGL_API SdfPath _ComputeControllerPath(const HdPluginRenderDelegateUniqueHandle &)
USDIMAGINGGL_API TfToken GetCurrentRendererId() const
Return the id of the currently used renderer plugin.
static SDF_API const SdfPath & AbsoluteRootPath()
USDIMAGINGGL_API void SetLightingStateFromOpenGL()
GlfSimpleLightingContextRefPtr _lightingContextForOpenGLState
Definition: engine.h:596
USDIMAGINGGL_API void _Execute(const UsdImagingGLRenderParams &params, HdTaskSharedPtrVector tasks)
HdRprimCollection _intersectCollection
Definition: engine.h:594
hboost::math::policies::policy< hboost::math::policies::domain_error< hboost::math::policies::ignore_error >, hboost::math::policies::pole_error< hboost::math::policies::ignore_error >, hboost::math::policies::overflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::underflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::denorm_error< hboost::math::policies::ignore_error >, hboost::math::policies::rounding_error< hboost::math::policies::ignore_error >, hboost::math::policies::evaluation_error< hboost::math::policies::ignore_error >, hboost::math::policies::indeterminate_result_error< hboost::math::policies::ignore_error > > policy
Definition: SYS_MathCbrt.h:35
USDIMAGINGGL_API void SetSelectionColor(GfVec4f const &color)
Sets the selection highlighting color.
Definition: vec2i.h:61
USDIMAGINGGL_API HdSelectionSharedPtr _GetSelection() const
TF_DECLARE_WEAK_AND_REF_PTRS(GlfSimpleLightingContext)
USDIMAGINGGL_API bool _CanPrepare(const UsdPrim &root)
SdfPath const _sceneDelegateId
Definition: engine.h:588
HdPluginRenderDelegateUniqueHandle _renderDelegate
Definition: engine.h:585
static USDIMAGINGGL_API HdxRenderTaskParams _MakeHydraUsdImagingGLRenderParams(UsdImagingGLRenderParams const &params)
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)
GLuint color
Definition: glcorearb.h:1260
USDIMAGINGGL_API void SetCameraPath(SdfPath const &id)
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
static USDIMAGINGGL_API bool _UpdateHydraCollection(HdRprimCollection *collection, SdfPathVector const &roots, UsdImagingGLRenderParams const &params)
USDIMAGINGGL_API Hgi * GetHgi()
USDIMAGINGGL_API void _InitializeHgiIfNecessary()
USDIMAGINGGL_API bool PauseRenderer()
USDIMAGINGGL_API void SetOverrideWindowPolicy(const std::pair< bool, CameraUtilConformWindowPolicy > &policy)
USDIMAGINGGL_API void SetCameraStateFromOpenGL()
UsdImagingGLEngine & operator=(const UsdImagingGLEngine &)=delete
Definition: vec4d.h:63
int HgiHandle< class HgiTexture > HgiTextureHandle
static USDIMAGINGGL_API bool IsColorCorrectionCapable()
Returns true if the platform is color correction capable.
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glcorearb.h:2538
GLuint const GLchar * name
Definition: glcorearb.h:785
std::vector< HdTaskSharedPtr > HdTaskSharedPtrVector
Definition: renderIndex.h:69
GLenum src
Definition: glcorearb.h:1792
USDIMAGINGGL_API bool IsPauseRendererSupported() const
Query the renderer as to whether it supports pausing and resuming.
USDIMAGINGGL_API void _PreSetTime(const UsdImagingGLRenderParams &params)
USDIMAGINGGL_API UsdImagingDelegate * _GetSceneDelegate() const
USDIMAGINGGL_API void SetColorCorrectionSettings(TfToken const &id)
Set id to one of the HdxColorCorrectionTokens.
std::shared_ptr< class HdxSelectionTracker > HdxSelectionTrackerSharedPtr
GLsizeiptr size
Definition: glcorearb.h:663
std::vector< std::pair< SdfPath, int > > HdInstancerContext
Instancer context: a pair of instancer paths and instance indices.
Definition: sceneDelegate.h:60
USDIMAGINGGL_API void SetCameraState(const GfMatrix4d &viewMatrix, const GfMatrix4d &projectionMatrix)
USDIMAGINGGL_API bool SetRendererPlugin(TfToken const &id)
USDIMAGINGGL_API void SetFraming(CameraUtilFraming const &framing)
USDIMAGINGGL_API void SetRenderBufferSize(GfVec2i const &size)
friend class UsdImagingGL_UnitTestGLDrawing
Open some protected methods for whitebox testing.
Definition: engine.h:506
Definition: token.h:87
VtValue _userFramebuffer
Definition: engine.h:582
GLuint framebuffer
Definition: glcorearb.h:1286
#define USDIMAGINGGL_API
Definition: api.h:40
static USDIMAGINGGL_API void _ComputeRenderTags(UsdImagingGLRenderParams const &params, TfTokenVector *renderTags)
USDIMAGINGGL_API void _PostSetTime(const UsdImagingGLRenderParams &params)
USDIMAGINGGL_API void AddSelected(SdfPath const &path, int instanceIndex)
GfVec4f _selectionColor
Definition: engine.h:599
HdRprimCollection _renderCollection
Definition: engine.h:593
USDIMAGINGGL_API HgiTextureHandle GetAovTexture(TfToken const &name) const
Returns an AOV texture handle for the given token.
std::vector< HdCommandDescriptor > HdCommandDescriptors
Definition: command.h:108
USDIMAGINGGL_API void SetSelected(SdfPathVector const &paths)
static USDIMAGINGGL_API bool IsHydraEnabled()
Returns true if Hydra is enabled for GL drawing.
USDIMAGINGGL_API HdRenderIndex * _GetRenderIndex() const
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
static USDIMAGINGGL_API TfTokenVector GetRendererPlugins()
Return the vector of available render-graph delegate plugins.
USDIMAGINGGL_API void SetRootTransform(GfMatrix4d const &xf)
Sets the root transform.
USDIMAGINGGL_API void SetWindowPolicy(CameraUtilConformWindowPolicy policy)
USDIMAGINGGL_API ~UsdImagingGLEngine()
Definition: prim.h:132
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
USDIMAGINGGL_API bool SetRendererAov(TfToken const &id)
Set the current renderer AOV to id.
USDIMAGINGGL_API bool InvokeRendererCommand(const TfToken &command, const HdCommandArgs &args=HdCommandArgs()) const
Definition: path.h:288
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
Definition: path.h:209
USDIMAGINGGL_API bool _IsUsingLegacyImpl() const
HdxSelectionTrackerSharedPtr _selTracker
Definition: engine.h:592
USDIMAGINGGL_API UsdImagingGLRendererSettingsList GetRendererSettingsList() const
Returns the list of renderer settings.
std::unique_ptr< HdRenderIndex > _renderIndex
Definition: engine.h:586
USDIMAGINGGL_API bool IsConverged() const
USDIMAGINGGL_API void SetRendererSetting(TfToken const &id, VtValue const &value)
Sets a renderer setting's value.
Definition: vec4f.h:63
CameraUtilConformWindowPolicy
Definition: conformWindow.h:44
USDIMAGINGGL_API void Render(const UsdPrim &root, const UsdImagingGLRenderParams &params)
Entry point for kicking off a render.
SdfPathVector _invisedPrimPaths
Definition: engine.h:603
Definition: hgi.h:106
std::unique_ptr< HdxTaskController > _taskController
Definition: engine.h:590
USDIMAGINGGL_API void PrepareBatch(const UsdPrim &root, const UsdImagingGLRenderParams &params)
Support for batched drawing.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
USDIMAGINGGL_API void _PrepareRender(const UsdImagingGLRenderParams &params)
VtDictionary HdCommandArgs
Definition: command.h:71
USDIMAGINGGL_API bool StopRenderer()
USDIMAGINGGL_API void _SetRenderDelegateAndRestoreState(HdPluginRenderDelegateUniqueHandle &&)
USDIMAGINGGL_API bool RestartRenderer()
USDIMAGINGGL_API void ClearSelected()
HgiUniquePtr _hgi
Definition: engine.h:578
USDIMAGINGGL_API bool IsStopRendererSupported() const
Query the renderer as to whether it supports stopping and restarting.
std::vector< UsdImagingGLRendererSetting > UsdImagingGLRendererSettingsList
USDIMAGINGGL_API void SetLightingState(GlfSimpleLightingContextPtr const &src)
Copy lighting state from another lighting context.
std::unique_ptr< UsdImagingGLLegacyEngine > _legacyImpl
Definition: engine.h:611
HdDriver _hgiDriver
Definition: engine.h:580
USDIMAGINGGL_API UsdImagingGLEngine(const HdDriver &driver=HdDriver())
Definition: vec3d.h:63
USDIMAGINGGL_API void RenderBatch(const SdfPathVector &paths, const UsdImagingGLRenderParams &params)
Support for batched drawing.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDIMAGINGGL_API TfTokenVector GetRendererAovs() const
Return the vector of available renderer AOV settings.
GLsizei const GLfloat * value
Definition: glcorearb.h:823
**If you just want to fire and args
Definition: thread.h:615
GLenum const GLfloat * params
Definition: glcorearb.h:104
USDIMAGINGGL_API VtValue GetRendererSetting(TfToken const &id) const
Gets a renderer setting's current value.
USDIMAGINGGL_API bool ResumeRenderer()
SdfPathVector _excludedPrimPaths
Definition: engine.h:602
static USDIMAGINGGL_API std::string GetRendererDisplayName(TfToken const &id)
Return the user-friendly description of a renderer plugin.
USDIMAGINGGL_API HdEngine * _GetHdEngine()
USDIMAGINGGL_API VtDictionary GetRenderStats() const
USDIMAGINGGL_API void _SetRenderDelegate(HdPluginRenderDelegateUniqueHandle &&)
USDIMAGINGGL_API HdCommandDescriptors GetRendererCommandDescriptors() const
std::shared_ptr< class HdSelection > HdSelectionSharedPtr
Definition: selection.h:40
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)
Definition: value.h:168
static USDIMAGINGGL_API TfToken _GetDefaultRendererPluginId()
USDIMAGINGGL_API void SetRootVisibility(bool isVisible)
Sets the root visibility.
std::vector< class GlfSimpleLight > GlfSimpleLightVector
Definition: simpleLight.h:231
USDIMAGINGGL_API HdxTaskController * _GetTaskController() const
USDIMAGINGGL_API void SetEnablePresentation(bool enabled)
SdfPath _rootPath
Definition: engine.h:601
USDIMAGINGGL_API void SetPresentationOutput(TfToken const &api, VtValue const &framebuffer)
GLenum const void * paths
Definition: glew.h:13872
std::unique_ptr< class Hgi > HgiUniquePtr
Definition: hgi.h:50