0022582: Visualization - provide an API for dumping a sub-region of the viewport
[occt.git] / src / OpenGl / OpenGl_Structure.cxx
index 1355473..cd7139c 100644 (file)
@@ -475,7 +475,8 @@ void OpenGl_Structure::Render (const Handle(OpenGl_Workspace) &theWorkspace) con
   {
     OpenGl_Mat4 aProjection = aCtx->ProjectionState.Current();
     OpenGl_Mat4 aWorldView  = aCtx->WorldViewState.Current();
-    TransformPersistence.Apply (theWorkspace->View()->Camera(), aProjection, aWorldView, theWorkspace->Width(), theWorkspace->Height());
+    TransformPersistence.Apply (theWorkspace->View()->Camera(), aProjection, aWorldView,
+                                aCtx->Viewport()[2], aCtx->Viewport()[3]);
 
     aCtx->ProjectionState.Push();
     aCtx->WorldViewState.Push();