diff --git a/src/editor/ModelViewerWidget.cpp b/src/editor/ModelViewerWidget.cpp index a1753715c1e..bc70a4404df 100644 --- a/src/editor/ModelViewerWidget.cpp +++ b/src/editor/ModelViewerWidget.cpp @@ -484,7 +484,7 @@ void ModelViewerWidget::OnRender(Graphics::Renderer *r) } // Render any extra effects - PostRender(); + m_extPostRender(); // helper rendering if (m_options.showLandingPad) { diff --git a/src/editor/ModelViewerWidget.h b/src/editor/ModelViewerWidget.h index c3b6de20b90..c2d756dbcb1 100644 --- a/src/editor/ModelViewerWidget.h +++ b/src/editor/ModelViewerWidget.h @@ -89,6 +89,8 @@ namespace Editor const matrix4x4f &GetModelViewMat() const { return m_modelViewMat; } + // Extend to render in-world using Graphics::Renderer + UIDelegate &GetUIExtPostRender() { return m_extPostRender; } // Extend to render on top of the viewport surface using ImDrawList UIDelegate &GetUIExtOverlay() { return m_extOverlay; } // Extend to add additional viewport menu buttons @@ -105,8 +107,7 @@ namespace Editor bool OnCloseRequested() override { return true; }; - virtual void PostRender() {}; - + UIDelegate m_extPostRender; UIDelegate m_extOverlay; UIDelegate m_extMenus; UIDelegate m_extViewportControls;