RenderProfile.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. #ifndef __ENGINE_BASE_PROFILING_H__
  13. #include <Engine/Base/Profiling.h>
  14. #endif
  15. class CRenderProfile : public CProfileForm {
  16. public:
  17. // indices for profiling counters and timers
  18. enum ProfileTimerIndex {
  19. PTI_RENDERING, // overall rendering time for CRenderer
  20. PTI_INITIALIZATION, // time spent in initialization
  21. PTI_ADDINITIAL, // time spent adding initial sectors
  22. PTI_CLEANUP, // time spent in destructor
  23. PTI_RENDERSCENE, // time spent in RenderScene()
  24. PTI_RENDERMODELS, // time spent in RenderModels()
  25. PTI_RENDERONEMODEL, // time spent in RenderOneModel()
  26. PTI_FINDSHADINGINFO, // time spent in FindShadingInfo() during RenderOneModel()
  27. PTI_FINDLIGHTS, // time spent in searching for lights in RenderOneModel()
  28. PTI_RENDERPARTICLES, // time spent in RenderParticles()
  29. PTI_SCANEDGES, // time spent in ScanEdges()
  30. PTI_INITSCANEDGES, // time spent in InitScanEdges()
  31. PTI_ENDSCANEDGES, // time spent in EndScanEdges()
  32. PTI_SCANONELINE, // time spent in ScanOneLine()
  33. PTI_PASSPORTAL, // time spent in PassPortal()
  34. PTI_ADDSPANSTOSCENE, // time spent in AddSpansToScene()
  35. PTI_PROCESSTRANSPORTAL, // time spent processing translucent portals
  36. PTI_ADDTRANSSPANSTOSCENE,// time spent in AddTranslucentSpansToScene()
  37. PTI_STEPANDRESORT, // time spent in StepAndResortActiveList()
  38. PTI_REMREMLIST, // time spent in RemRemoveListFromActiveList()
  39. PTI_ADDADDLIST, // time spent in AddAddListToActiveList()
  40. PTI_ADDNONZONINGBRUSH, // time spent in AddNonZoningBrush()
  41. PTI_ADDMODELENTITY, // time spent in AddModelEntity()
  42. PTI_ADDZONINGSECTORS, // time spent in AddZoningSectors()
  43. PTI_ADDENTITIESINSECTOR, // time spent in AddEntitiesInSector()
  44. PTI_ADDENTITIESINBOX, // time spent in AddEntitiesInBox()
  45. PTI_PREPAREBRUSH, // time spent in PrepareBrush()
  46. PTI_ADDSECTOR, // time spent in AddSector()
  47. PTI_TRANSFORMVERTICES, // time spent transforming sector vertices
  48. PTI_TRANSFORMPLANES, // time spent transforming sector planes
  49. PTI_MAKENONDETAILSCREENPOLYGONS,
  50. PTI_CLIPTOALLPLANES,
  51. PTI_PROJECTVERTICES,
  52. PTI_MAKEFINALPOLYGONEDGES,
  53. PTI_ADDSCREENEDGES,
  54. PTI_MAKEDETAILSCREENPOLYGONS,
  55. PTI_MAKESCREENEDGE, // time spent in MakeScreenEdge()
  56. PTI_ADDEDGETOADDLIST, // time spent in AddEdgeToAddList()
  57. PTI_MAKESCREENPOLYGON, // time spent in MakeScreenPolygon()
  58. PTI_REDRAWVIEW, // time spent in CSCapeLibrary::RedrawView()
  59. PTI_RENDERINTERFACE, // time spent in CPlayerEntity::RenderInterface()
  60. PTI_COUNT
  61. };
  62. enum ProfileCounterIndex {
  63. PCI_POLYGONSRENDERED, // total number of polygons rendered
  64. PCI_TRANSFORMEDSECTORS, // total number of transformed sectors
  65. PCI_TRANSFORMEDVERTICES, // total number of transformed vertices
  66. PCI_TRANSFORMEDPLANES, // total number of transformed planes
  67. PCI_TRANSFORMEDEDGES, // total number of transformed edges
  68. PCI_NONDETAILPOLYGONS,
  69. PCI_DETAILPOLYGONS,
  70. PCI_EDGETRANSITIONS, // total number of edge transitions during scanning
  71. PCI_SWAPEDGETRANSITIONS, // number of edge transitions with swap polygons
  72. PCI_OVERALLSCANLINES, // total number of scan lines processed
  73. PCI_SCANLINEPORTALRETRIES, // scan line retries due to portal encounters
  74. PCI_COHERENTSCANLINES, // scan lines that were coherent with previous one
  75. PCI_SPANS, // total generated spans
  76. PCI_TRAPEZOIDS, // total generated trapezoids
  77. PCI_COUNT
  78. };
  79. CRenderProfile(void);
  80. };