26 std::lock_guard lock(m_mutex);
32 std::lock_guard lock(m_mutex);
50 mutable std::mutex m_mutex;
54template <
typename T,
int N>
62 std::lock_guard
lock(m_mutex);
64 m_sum -= m_history[0];
65 std::shift_left(m_history.begin(), m_history.end(), 1);
66 m_history[N - 1] = value;
71 std::lock_guard
lock(m_mutex);
75 std::unique_lock<std::mutex>
lock()
const
77 return std::unique_lock(m_mutex);
82 return m_history.data();
92 std::array<T, N> m_history;
94 mutable std::mutex m_mutex;
106 static inline std::atomic<uint32_t>
fps = 0;
107 static inline std::atomic<uint32_t>
ups = 0;
121 static inline std::atomic<float>
PV;
125 static inline std::atomic<uint8_t>
biome;
159 static inline std::atomic<float>
h_mie = 1200.0f;
160 static inline std::atomic<float>
g = 0.95f;
Definition: DebugGui.hpp:17
Atomic(T value)
Definition: DebugGui.hpp:22
void set(T value)
Definition: DebugGui.hpp:30
T get() const
Definition: DebugGui.hpp:24
Atomic< T > & operator=(T value)
Definition: DebugGui.hpp:41
Definition: DebugGui.hpp:99
static std::atomic< float > sun_intensity
Definition: DebugGui.hpp:157
static std::atomic< float > weirdness
Definition: DebugGui.hpp:120
static History< float, 100 > chunk_count_history
Definition: DebugGui.hpp:134
static std::atomic< int > n_samples
Definition: DebugGui.hpp:161
static std::atomic< uint8_t > biome
Definition: DebugGui.hpp:125
static History< float, 100 > cpu_time_history
Definition: DebugGui.hpp:129
static Atomic< glm::vec3 > player_position
Definition: DebugGui.hpp:111
static History< float, 100 > chunk_unload_time_history
Definition: DebugGui.hpp:141
static std::atomic< float > erosion
Definition: DebugGui.hpp:118
static std::atomic< float > atmosphere_radius
Definition: DebugGui.hpp:153
static std::atomic< float > player_height
Definition: DebugGui.hpp:154
static std::atomic< float > humidity
Definition: DebugGui.hpp:119
static std::atomic< size_t > send_buffer_size
Definition: DebugGui.hpp:145
static std::atomic< uint64_t > humidity_texture_id
Definition: DebugGui.hpp:171
static std::atomic< bool > isLand
Definition: DebugGui.hpp:123
static History< float, 1000 > chunk_load_queue_size_history
Definition: DebugGui.hpp:136
static std::atomic< uint64_t > gpu_allocated_memory
Definition: DebugGui.hpp:109
static std::atomic< float > sun_theta
Definition: DebugGui.hpp:151
static std::atomic< int > looked_face_block_light
Definition: DebugGui.hpp:115
static std::atomic< bool > isOcean
Definition: DebugGui.hpp:124
static Atomic< glm::vec3 > beta_mie
Definition: DebugGui.hpp:156
static Atomic< glm::vec3 > beta_rayleigh
Definition: DebugGui.hpp:155
static Atomic< glm::vec3 > player_velocity_vec
Definition: DebugGui.hpp:112
static std::atomic< uint64_t > PV_texture_id
Definition: DebugGui.hpp:169
static std::atomic< uint64_t > weirdness_texture_id
Definition: DebugGui.hpp:167
static std::atomic< int > n_light_samples
Definition: DebugGui.hpp:162
static std::atomic< double > create_mesh_time
Definition: DebugGui.hpp:143
static std::atomic< float > continentalness
Definition: DebugGui.hpp:117
static std::atomic< uint64_t > continentalness_texture_id
Definition: DebugGui.hpp:166
static std::atomic< uint64_t > erosion_texture_id
Definition: DebugGui.hpp:170
static std::atomic< float > h_rayleigh
Definition: DebugGui.hpp:158
static std::atomic< uint64_t > temperature_texture_id
Definition: DebugGui.hpp:168
static std::atomic< int > looked_face_sky_light
Definition: DebugGui.hpp:114
static std::atomic< float > earth_radius
Definition: DebugGui.hpp:152
static std::atomic< uint32_t > ups
Definition: DebugGui.hpp:107
static constexpr int NOISE_SIZE
Definition: DebugGui.hpp:103
static History< size_t, 100 > send_history
Definition: DebugGui.hpp:148
static std::atomic< uint64_t > biome_texture_id
Definition: DebugGui.hpp:172
static std::atomic< float > g
Definition: DebugGui.hpp:160
static std::atomic< size_t > recv_buffer_size
Definition: DebugGui.hpp:146
static History< float, 100 > chunk_render_time_history
Definition: DebugGui.hpp:139
static std::atomic< float > PV
Definition: DebugGui.hpp:121
static std::atomic< uint32_t > fps
Definition: DebugGui.hpp:106
static History< float, 1000 > chunk_unload_queue_size_history
Definition: DebugGui.hpp:137
static History< float, 100 > frame_time_history
Definition: DebugGui.hpp:128
static std::atomic< float > temperature
Definition: DebugGui.hpp:122
static std::atomic< uint64_t > rendered_triangles
Definition: DebugGui.hpp:108
static History< float, 100 > cpu_wait_time_history
Definition: DebugGui.hpp:130
static std::atomic< double > player_velocity
Definition: DebugGui.hpp:113
static std::atomic_int32_t chunk_mesh_count
Definition: DebugGui.hpp:132
static History< float, 100 > chunk_gen_time_history
Definition: DebugGui.hpp:140
static History< size_t, 100 > recv_history
Definition: DebugGui.hpp:149
static std::atomic< float > h_mie
Definition: DebugGui.hpp:159
static std::atomic< uint64_t > imgui_texture_id
Definition: DebugGui.hpp:164
Definition: DebugGui.hpp:56
T * data()
Definition: DebugGui.hpp:80
void push(T value)
Definition: DebugGui.hpp:60
T average() const
Definition: DebugGui.hpp:69
int size() const
Definition: DebugGui.hpp:85
std::unique_lock< std::mutex > lock() const
Definition: DebugGui.hpp:75