mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0030135: Visualization, TKOpenGl - frame statistics do not include information about instanced structures
OpenGl_FrameStats now takes into account OpenGl_Structure::InstancedStructure(). OpenGl_View::renderStructs() - fixed resetting non-culled structure counters.
This commit is contained in:
parent
6b1800cb76
commit
0de16e296a
@ -399,8 +399,11 @@ void OpenGl_FrameStats::updateStructures (Standard_Integer theViewId,
|
|||||||
for (OpenGl_IndexedMapOfStructure::Iterator aStructIter (theStructures); aStructIter.More(); aStructIter.Next())
|
for (OpenGl_IndexedMapOfStructure::Iterator aStructIter (theStructures); aStructIter.More(); aStructIter.Next())
|
||||||
{
|
{
|
||||||
const OpenGl_Structure* aStruct = aStructIter.Value();
|
const OpenGl_Structure* aStruct = aStructIter.Value();
|
||||||
if (aStruct->IsCulled()
|
const bool isStructHidden = aStruct->IsCulled()
|
||||||
|| !aStruct->IsVisible (theViewId))
|
|| !aStruct->IsVisible (theViewId);
|
||||||
|
for (; aStruct != NULL; aStruct = aStruct->InstancedStructure())
|
||||||
|
{
|
||||||
|
if (isStructHidden)
|
||||||
{
|
{
|
||||||
if (theToCountMem)
|
if (theToCountMem)
|
||||||
{
|
{
|
||||||
@ -525,3 +528,4 @@ void OpenGl_FrameStats::updateStructures (Standard_Integer theViewId,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -1071,6 +1071,7 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection,
|
|||||||
OpenGl_FrameBuffer* theOitAccumFbo,
|
OpenGl_FrameBuffer* theOitAccumFbo,
|
||||||
const Standard_Boolean theToDrawImmediate)
|
const Standard_Boolean theToDrawImmediate)
|
||||||
{
|
{
|
||||||
|
myZLayers.UpdateCulling (myWorkspace, theToDrawImmediate);
|
||||||
if ( myZLayers.NbStructures() <= 0 )
|
if ( myZLayers.NbStructures() <= 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1080,8 +1081,6 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection,
|
|||||||
myRaytraceInitStatus == OpenGl_RT_FAIL ||
|
myRaytraceInitStatus == OpenGl_RT_FAIL ||
|
||||||
aCtx->IsFeedback();
|
aCtx->IsFeedback();
|
||||||
|
|
||||||
myZLayers.UpdateCulling (myWorkspace, theToDrawImmediate);
|
|
||||||
|
|
||||||
if (!toRenderGL)
|
if (!toRenderGL)
|
||||||
{
|
{
|
||||||
toRenderGL = !initRaytraceResources (aCtx) ||
|
toRenderGL = !initRaytraceResources (aCtx) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user