PS2GL
OpenGL*-like API for the PS2
Loading...
Searching...
No Matches
metrics.h
1//
2// ps2gl Metrics Module definitions
3//
4// Original author: Stefan Boberg (boberg@team17.com)
5//
6
7#define PS2GL_METRICS_ENABLE 1
8
9enum MetricsEnum {
11 kMetricsTextureUploadCount,
12
14 kMetricsTextureUploadBytes,
15
17 kMetricsClutUploadCount,
18
20 kMetricsRendererUpload,
21
23 kMetricsBindTexture,
24
26 kMetricsCount,
27};
28
29typedef unsigned long long Metric_t; // 64-bit integer
30
31extern Metric_t g_Metrics[kMetricsCount];
32
35extern void pglResetMetrics();
36
39inline Metric_t pglGetMetric(MetricsEnum eMetric)
40{
41 return g_Metrics[eMetric];
42}
43
46inline void pglResetMetric(MetricsEnum eMetric)
47{
48 g_Metrics[eMetric] = 0;
49}
50
53inline void pglAddToMetric(MetricsEnum eMetric, Metric_t Value = 1)
54{
55#if PS2GL_METRICS_ENABLE
56 g_Metrics[eMetric] += Value;
57#endif
58}