Skip to content

Commit

Permalink
UsdImagingGLEngine: Making _engine private and providing accessor _Ge…
Browse files Browse the repository at this point in the history
…tHdEngine for subclasses instead.

(Internal change: 2077286)
  • Loading branch information
unhyperbolic authored and pixar-oss committed Jun 30, 2020
1 parent 53681e9 commit c03508b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pxr/usdImaging/usdImagingGL/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1462,5 +1462,11 @@ UsdImagingGLEngine::_GetSceneDelegate() const
return _sceneDelegate.get();
}

HdEngine *
UsdImagingGLEngine::_GetHdEngine()
{
return &_engine;
}

PXR_NAMESPACE_CLOSE_SCOPE

6 changes: 6 additions & 0 deletions pxr/usdImaging/usdImagingGL/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@ class UsdImagingGLEngine
USDIMAGINGGL_API
UsdImagingDelegate *_GetSceneDelegate() const;

USDIMAGINGGL_API
HdEngine *_GetHdEngine();

USDIMAGINGGL_API
HdSelectionSharedPtr _GetSelection() const;

Expand All @@ -491,8 +494,11 @@ class UsdImagingGLEngine
HgiUniquePtr _hgi;
// Similar for HdDriver.
HdDriver _hgiDriver;

private:
HdEngine _engine;

protected:
// ... and the other Hydra resources
HdPluginRenderDelegateUniqueHandle _renderDelegate;
std::unique_ptr<HdRenderIndex> _renderIndex;
Expand Down
3 changes: 2 additions & 1 deletion pxr/usdImaging/usdImagingGL/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
// 2 -> 3: refactor picking API.
// 3 -> 4: Add "instancerContext" to new picking API.
// 4 -> 5: Use UsdImagingGLEngine::_GetSceneDelegate() instead of _delegate.
#define USDIMAGINGGL_API_VERSION 5
// 5 -> 6: Use UsdImagingGLEngine::_GetHdEngine() instead of _engine.
#define USDIMAGINGGL_API_VERSION 6

#endif // PXR_USD_IMAGING_USD_IMAGING_GL_VERSION_H

0 comments on commit c03508b

Please sign in to comment.