Simulant  21.12-194
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
stats_recorder.h
1 #pragma once
2 
3 #include <cstdint>
4 
5 #include "generic/managed.h"
6 #include "types.h"
7 
8 namespace smlt {
9 
11  public RefCounted<StatsRecorder> {
12 
13 public:
14  uint32_t geometry_visible() const {
15  return geometry_visible_;
16  }
17 
18  void set_geometry_visible(uint32_t value) {
19  geometry_visible_ = value;
20  }
21 
22  uint32_t subactors_rendered() const { return subactors_renderered_; }
23  void set_subactors_rendered(uint32_t value) {
24  subactors_renderered_ = value;
25  }
26 
27  float frame_time() const { return frame_time_; }
28  void set_frame_time(float value) {
29  frame_time_ = value;
30  }
31 
32  uint32_t frames_per_second() const { return frames_per_second_; }
33  void set_frames_per_second(uint32_t value) {
34  frames_per_second_ = value;
35  }
36 
37  uint64_t fixed_steps_run() const { return fixed_steps_run_; }
38  uint64_t frames_run() const { return frames_run_; }
39 
40  void increment_fixed_steps() { fixed_steps_run_++; }
41  void increment_frames() { frames_run_++; }
42 
43  void reset_polygons_rendered() {
44  polygons_rendered_ = 0;
45  }
46 
47  void increment_polygons_rendered(MeshArrangement arrangement, uint32_t element_count);
48  uint32_t polygons_rendered() const {
49  return polygons_rendered_;
50  }
51 
52 private:
53  float frame_time_ = 0;
54  uint32_t subactors_renderered_ = 0;
55  uint32_t frames_per_second_ = 0;
56  uint32_t geometry_visible_ = 0;
57 
58  uint64_t fixed_steps_run_ = 0;
59  uint64_t frames_run_ = 0;
60 
61  uint32_t polygons_rendered_ = 0;
62 };
63 
64 
65 }
smlt::StatsRecorder
Definition: stats_recorder.h:11
smlt::RefCounted
Definition: managed.h:65
smlt
Definition: animation.cpp:25