X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FOpenGl%2FOpenGl_Element.hxx;h=f4c67692e46d00418236865c5a84654f6888df86;hp=324aa7db48b3b3f611b0e13a430e82756664fb32;hb=b9f43ad13b16812ccf1ac2ec8cda13502eb6d810;hpb=b8a00b410a6961a7b9dccd8da6919888088a8be3 diff --git a/src/OpenGl/OpenGl_Element.hxx b/src/OpenGl/OpenGl_Element.hxx index 324aa7d..f4c6769 100644 --- a/src/OpenGl/OpenGl_Element.hxx +++ b/src/OpenGl/OpenGl_Element.hxx @@ -19,6 +19,7 @@ #include #include +class Graphic3d_FrameStatsDataTmp; class OpenGl_Workspace; class OpenGl_Context; @@ -63,6 +64,16 @@ public: //! Returns estimated GPU memory usage for holding data without considering overheads and allocation alignment rules. virtual Standard_Size EstimatedDataSize() const { return 0; } + //! Increment memory usage statistics. + //! Default implementation puts EstimatedDataSize() into Graphic3d_FrameStatsCounter_EstimatedBytesGeom. + Standard_EXPORT virtual void UpdateMemStats (Graphic3d_FrameStatsDataTmp& theStats) const; + + //! Increment draw calls statistics. + //! @param theStats [in] [out] frame counters to increment + //! @param theIsDetailed [in] indicate detailed dump (more counters - number of triangles, points, etc.) + Standard_EXPORT virtual void UpdateDrawStats (Graphic3d_FrameStatsDataTmp& theStats, + bool theIsDetailed) const; + //! Update parameters of the drawable elements. virtual void SynchronizeAspects() {}