diff options
author | Määttä Antti <antti.maatta@qt.io> | 2018-06-13 16:21:50 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2018-08-01 05:53:51 +0000 |
commit | 825651b6e975ffbc1069c0d747018fff2f232cb7 (patch) | |
tree | cf0f58da5c785976687ca26c82fdd9cb8d8077f6 /src/Authoring/Studio/Render/StudioRendererTranslation.h | |
parent | da284e3bd0bc5972f84fb247f82e198261112c31 (diff) |
Implement scene view preview in edit modes
Task-number: QT3DS-250
Change-Id: Iaf7bf245ebf3de00339f5cbfb0f9fc2d4f099373
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/StudioRendererTranslation.h')
-rw-r--r-- | src/Authoring/Studio/Render/StudioRendererTranslation.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Authoring/Studio/Render/StudioRendererTranslation.h b/src/Authoring/Studio/Render/StudioRendererTranslation.h index 2a75e877..491af9ce 100644 --- a/src/Authoring/Studio/Render/StudioRendererTranslation.h +++ b/src/Authoring/Studio/Render/StudioRendererTranslation.h @@ -402,6 +402,8 @@ namespace studio { QT3DSVec4 m_guideFillColor; QT3DSVec4 m_selectedGuideFillColor; + const float m_previewViewportSize = 600.0f; + STranslation(IStudioRenderer &inRenderer, IQt3DSRenderContext &inContext); void MarkBeginComponentSeconds(qt3dsdm::Qt3DSDMSlideHandle) { ++m_ComponentSecondsDepth; } @@ -484,6 +486,8 @@ namespace studio { void SetViewport(QT3DSF32 inWidth, QT3DSF32 inHeight) { m_Viewport = QT3DSVec2(inWidth, inHeight); } QT3DSVec2 GetViewportDimensions() { return m_Viewport; } + QT3DSVec2 GetPreviewViewportDimensions(); + qt3ds::render::NVRenderRect GetPreviewViewport(); void ClearDirtySet() { @@ -496,16 +500,17 @@ namespace studio { m_DirtySet.clear(); } // We build the render graph every time we render. This may seem wasteful - void BuildRenderGraph(qt3dsdm::Qt3DSDMInstanceHandle inParent, - Qt3DSDMInstanceHandle inAliasHandle = qt3dsdm::Qt3DSDMInstanceHandle()); - void - BuildRenderGraph(SGraphObjectTranslator &inParent, - qt3dsdm::Qt3DSDMInstanceHandle inAliasHandle = qt3dsdm::Qt3DSDMInstanceHandle()); + void BuildRenderGraph(qt3dsdm::Qt3DSDMInstanceHandle inParent, bool scenePreviewPass, + Qt3DSDMInstanceHandle inAliasHandle + = qt3dsdm::Qt3DSDMInstanceHandle()); + void BuildRenderGraph(SGraphObjectTranslator &inParent, bool scenePreviewPass, + qt3dsdm::Qt3DSDMInstanceHandle inAliasHandle + = qt3dsdm::Qt3DSDMInstanceHandle()); void DeactivateScan(SGraphObjectTranslator &inParent, qt3dsdm::Qt3DSDMInstanceHandle inAliasHandle = qt3dsdm::Qt3DSDMInstanceHandle()); - void PreRender(); - void Render(int inWidgetId, bool inDrawGuides); + void PreRender(bool scenePreviewPass); + void Render(int inWidgetId, bool inDrawGuides, bool scenePreviewPass); void EndRender(); void DoPrepareForDrag(SNode *inSelectedNode); void ResetWidgets(); |