My Project
RenderDevice.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
6  {
7  public:
8  enum StatisticsType
9  {
10  DRAW_PERF_TRIANGLES_UNKNOWN = 0,
11  DRAW_PERF_TRIANGLES_UI = 1,
12  DRAW_PERF_TRIANGLES_TERRAIN = 2,
13  DRAW_PERF_TRIANGLES_CHARACTER = 3,
14  DRAW_PERF_TRIANGLES_MESH = 4,
15  // total number of draw calls
16  DRAW_PERF_DRAW_CALL_COUNT = 5,
17  // total triangles
18  DRAW_PERF_TOTAL_TRIANGLES = 6,
19  DRAW_PERF_END,
20  };
21  public:
23  static int GetPerfCount(StatisticsType nStatisticsType);
25  static void ClearAllPerfCount();
26 
28  static void IncrementDrawBatchAndVertices(int nDrawCount, int nVertices, int nPrimitiveType = DRAW_PERF_TRIANGLES_UNKNOWN);
29 
30  /* max number of simultaneous textures. in most cards, it is 8, some is 4. */
31  static int GetMaxSimultaneousTextures();
32  public:
33 
34  static int g_perfCounters[DRAW_PERF_END];
35  };
36 }
37 
38 #ifdef USE_DIRECTX_RENDERER
39 #include "RenderDeviceDirectX.h"
40 #elif defined(USE_OPENGL_RENDERER)
41 #include "RenderDeviceOpenGL.h"
42 #else
43 #include "RenderDeviceOpenGL.h"
44 #endif
static int GetPerfCount(StatisticsType nStatisticsType)
get the performance counter for a given type
Definition: RenderDevice.cpp:17
different physics engine has different winding order.
Definition: EventBinding.h:32
Definition: RenderDevice.h:5
static void ClearAllPerfCount()
reset all the performance counters to 0.
Definition: RenderDevice.cpp:22
static void IncrementDrawBatchAndVertices(int nDrawCount, int nVertices, int nPrimitiveType=DRAW_PERF_TRIANGLES_UNKNOWN)
increment both draw count and vertices
Definition: RenderDevice.cpp:27