mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031505: Point Cloud Rendering - fix on-screen statistics about number of visible points
OpenGl_Element now provide methods ::UpdateMemStats() and ::UpdateDrawStats() for unified request of statistics used by OpenGl_FrameStats instead of direct handling of OpenGl_PrimitiveArray. Graphic3d_FrameStatsCounter counters list has been extended by Graphic3d_FrameStatsCounter_NbLinesNotCulled.
This commit is contained in:
@@ -305,6 +305,7 @@ TCollection_AsciiString Graphic3d_FrameStats::FormatStats (Graphic3d_RenderingPa
|
||||
if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Groups) != 0
|
||||
|| (theFlags & Graphic3d_RenderingParams::PerfCounters_GroupArrays) != 0
|
||||
|| (theFlags & Graphic3d_RenderingParams::PerfCounters_Triangles) != 0
|
||||
|| (theFlags & Graphic3d_RenderingParams::PerfCounters_Lines) != 0
|
||||
|| (theFlags & Graphic3d_RenderingParams::PerfCounters_Points) != 0
|
||||
|| (!myIsLongLineFormat
|
||||
&& ((theFlags & Graphic3d_RenderingParams::PerfCounters_Structures) != 0
|
||||
@@ -338,6 +339,10 @@ TCollection_AsciiString Graphic3d_FrameStats::FormatStats (Graphic3d_RenderingPa
|
||||
{
|
||||
formatCounter (aBuf, aValWidth, " Triangles: ", aStats[Graphic3d_FrameStatsCounter_NbTrianglesNotCulled], "\n");
|
||||
}
|
||||
if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Lines) != 0)
|
||||
{
|
||||
formatCounter (aBuf, aValWidth, " Lines: ", aStats[Graphic3d_FrameStatsCounter_NbLinesNotCulled], "\n");
|
||||
}
|
||||
if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Points) != 0)
|
||||
{
|
||||
formatCounter (aBuf, aValWidth, " Points: ", aStats[Graphic3d_FrameStatsCounter_NbPointsNotCulled], "\n");
|
||||
@@ -437,6 +442,10 @@ void Graphic3d_FrameStats::FormatStats (TColStd_IndexedDataMapOfStringString&
|
||||
{
|
||||
addInfo (theDict, "Rendered triangles", aStats[Graphic3d_FrameStatsCounter_NbTrianglesNotCulled]);
|
||||
}
|
||||
if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Lines) != 0)
|
||||
{
|
||||
addInfo (theDict, "Rendered lines", aStats[Graphic3d_FrameStatsCounter_NbLinesNotCulled]);
|
||||
}
|
||||
if ((theFlags & Graphic3d_RenderingParams::PerfCounters_Points) != 0)
|
||||
{
|
||||
addInfo (theDict, "Rendered points", aStats[Graphic3d_FrameStatsCounter_NbPointsNotCulled]);
|
||||
|
@@ -28,7 +28,9 @@ enum Graphic3d_FrameStatsCounter
|
||||
Graphic3d_FrameStatsCounter_NbElemsPointNotCulled, //!< number of not culled OpenGl_PrimitiveArray drawing points
|
||||
Graphic3d_FrameStatsCounter_NbElemsTextNotCulled, //!< number of not culled OpenGl_Text
|
||||
Graphic3d_FrameStatsCounter_NbTrianglesNotCulled, //!< number of not culled (as structure) triangles
|
||||
Graphic3d_FrameStatsCounter_NbLinesNotCulled, //!< number of not culled (as structure) line segments
|
||||
Graphic3d_FrameStatsCounter_NbPointsNotCulled, //!< number of not culled (as structure) points
|
||||
//Graphic3d_FrameStatsCounter_NbGlyphsNotCulled, //!< number glyphs, to be considered in future
|
||||
Graphic3d_FrameStatsCounter_EstimatedBytesGeom, //!< estimated GPU memory used for geometry
|
||||
Graphic3d_FrameStatsCounter_EstimatedBytesFbos, //!< estimated GPU memory used for FBOs
|
||||
Graphic3d_FrameStatsCounter_EstimatedBytesTextures, //!< estimated GPU memory used for textures
|
||||
|
@@ -60,19 +60,20 @@ public:
|
||||
//
|
||||
PerfCounters_Triangles = 0x040, //!< count Triangles
|
||||
PerfCounters_Points = 0x080, //!< count Points
|
||||
PerfCounters_Lines = 0x100, //!< count Line segments
|
||||
//
|
||||
PerfCounters_EstimMem = 0x100, //!< estimated GPU memory usage
|
||||
PerfCounters_EstimMem = 0x200, //!< estimated GPU memory usage
|
||||
//
|
||||
PerfCounters_FrameTime = 0x200, //!< frame CPU utilization time (rendering thread); @sa Graphic3d_FrameStatsTimer
|
||||
PerfCounters_FrameTimeMax= 0x400, //!< maximum frame times
|
||||
PerfCounters_FrameTime = 0x400, //!< frame CPU utilization time (rendering thread); @sa Graphic3d_FrameStatsTimer
|
||||
PerfCounters_FrameTimeMax= 0x800, //!< maximum frame times
|
||||
//
|
||||
PerfCounters_SkipImmediate = 0x800, //!< do not include immediate viewer updates (e.g. lazy updates without redrawing entire view content)
|
||||
PerfCounters_SkipImmediate = 0x1000, //!< do not include immediate viewer updates (e.g. lazy updates without redrawing entire view content)
|
||||
//! show basic statistics
|
||||
PerfCounters_Basic = PerfCounters_FrameRate | PerfCounters_CPU | PerfCounters_Layers | PerfCounters_Structures,
|
||||
//! extended (verbose) statistics
|
||||
PerfCounters_Extended = PerfCounters_Basic
|
||||
| PerfCounters_Groups | PerfCounters_GroupArrays
|
||||
| PerfCounters_Triangles | PerfCounters_Points
|
||||
| PerfCounters_Triangles | PerfCounters_Points | PerfCounters_Lines
|
||||
| PerfCounters_EstimMem,
|
||||
//! all counters
|
||||
PerfCounters_All = PerfCounters_Extended
|
||||
|
Reference in New Issue
Block a user