1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0030144: Visualization, TKOpenGl - extend OpenGl_FrameStats with frame timers

This commit is contained in:
kgv
2018-09-17 18:11:05 +03:00
committed by apn
parent 9b9f2fe972
commit 5e30547b63
18 changed files with 1391 additions and 438 deletions

View File

@@ -166,7 +166,7 @@ void OpenGl_View::Redraw()
const Graphic3d_StereoMode aStereoMode = myRenderParams.StereoMode;
Graphic3d_Camera::Projection aProjectType = myCamera->ProjectionType();
Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext();
aCtx->FrameStats()->FrameStart (myWorkspace);
aCtx->FrameStats()->FrameStart (myWorkspace->View(), false);
// release pending GL resources
aCtx->ReleaseDelayed();
@@ -566,7 +566,7 @@ void OpenGl_View::Redraw()
// reset render mode state
aCtx->FetchState();
aCtx->FrameStats()->FrameEnd (myWorkspace);
aCtx->FrameStats()->FrameEnd (myWorkspace->View(), false);
myWasRedrawnGL = Standard_True;
}
@@ -592,7 +592,7 @@ void OpenGl_View::RedrawImmediate()
const Graphic3d_StereoMode aStereoMode = myRenderParams.StereoMode;
Graphic3d_Camera::Projection aProjectType = myCamera->ProjectionType();
OpenGl_FrameBuffer* aFrameBuffer = myFBO.operator->();
aCtx->FrameStats()->FrameStart (myWorkspace);
aCtx->FrameStats()->FrameStart (myWorkspace->View(), true);
if ( aFrameBuffer == NULL
&& !aCtx->DefaultFrameBuffer().IsNull()
@@ -733,7 +733,7 @@ void OpenGl_View::RedrawImmediate()
{
aCtx->core11fwd->glFlush();
}
aCtx->FrameStats()->FrameEnd (myWorkspace);
aCtx->FrameStats()->FrameEnd (myWorkspace->View(), true);
myWasRedrawnGL = Standard_True;
}