• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Razakhel / RaZ / 19747183745

27 Nov 2025 08:25PM UTC coverage: 74.374% (-0.009%) from 74.383%
19747183745

push

github

Razakhel
[Extern/ImGui] Updated ImGui to 1.92.5 & ImPlot to commit 285df9 (0.17+)

- Removed the fonts/ & freetype/ folders which are technically unused for now

8524 of 11461 relevant lines covered (74.37%)

1724.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.27
/src/RaZ/Render/Overlay.cpp
1
#include "RaZ/Render/Overlay.hpp"
2
#include "RaZ/Render/Renderer.hpp"
3
#include "RaZ/Render/Texture.hpp"
4
#include "RaZ/Utils/Logger.hpp"
5

6
#include "imgui.h"
7
#include "imgui_impl_glfw.h"
8
#include "imgui_impl_opengl3.h"
9
#include "misc/cpp/imgui_stdlib.h"
10
#include "implot.h"
11

12
#include "tracy/Tracy.hpp"
13

14
namespace Raz {
15

16
OverlayWindow& Overlay::addWindow(std::string title, const Vec2f& initSize, const Vec2f& initPos) {
7✔
17
  return *m_windows.emplace_back(std::make_unique<OverlayWindow>(std::move(title), initSize, initPos));
7✔
18
}
19

20
bool Overlay::hasKeyboardFocus() const {
1✔
21
  return ImGui::GetIO().WantCaptureKeyboard;
1✔
22
}
23

24
bool Overlay::hasMouseFocus() const {
1✔
25
  return ImGui::GetIO().WantCaptureMouse;
1✔
26
}
27

28
void Overlay::render() const {
5✔
29
  ZoneScopedN("Overlay::render");
30

31
#if !defined(USE_OPENGL_ES) && defined(RAZ_CONFIG_DEBUG)
32
  if (Renderer::checkVersion(4, 3))
5✔
33
    Renderer::pushDebugGroup("Overlay pass");
10✔
34
#endif
35

36
  ImGui_ImplOpenGL3_NewFrame();
5✔
37
  ImGui_ImplGlfw_NewFrame();
5✔
38
  ImGui::NewFrame();
5✔
39

40
  for (const std::unique_ptr<OverlayWindow>& window : m_windows)
18✔
41
    window->render();
13✔
42

43
  ImGui::Render();
5✔
44
  ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
5✔
45

46
#if !defined(USE_OPENGL_ES) && defined(RAZ_CONFIG_DEBUG)
47
  if (Renderer::checkVersion(4, 3))
5✔
48
    Renderer::popDebugGroup();
5✔
49
#endif
50
}
5✔
51

52
void Overlay::initialize(GLFWwindow* windowHandle) {
11✔
53
  ZoneScopedN("Overlay::initialize");
54

55
  if (ImGui::GetCurrentContext() != nullptr)
11✔
56
    return; // The overlay has already been initialized
9✔
57

58
  Logger::debug("[Overlay] Initializing...");
2✔
59

60
  IMGUI_CHECKVERSION();
2✔
61

62
  ImGui::CreateContext();
2✔
63
  ImPlot::CreateContext();
2✔
64

65
  ImGui::StyleColorsDark();
2✔
66

67
  ImGui_ImplGlfw_InitForOpenGL(windowHandle, false);
2✔
68

69
#if !defined(RAZ_PLATFORM_EMSCRIPTEN)
70
  ImGui_ImplOpenGL3_Init("#version 330 core");
2✔
71
#else
72
  ImGui_ImplOpenGL3_Init("#version 300 es");
73
#endif
74

75
  Logger::debug("[Overlay] Initialized");
4✔
76
}
77

78
void Overlay::destroy() {
2✔
79
  ZoneScopedN("Overlay::destroy");
80

81
  if (ImGui::GetCurrentContext() == nullptr)
2✔
82
    return; // The overlay has already been destroyed
×
83

84
  Logger::debug("[Overlay] Destroying...");
2✔
85

86
  ImGui_ImplOpenGL3_Shutdown();
2✔
87
  ImGui_ImplGlfw_Shutdown();
2✔
88

89
  ImPlot::DestroyContext();
2✔
90
  ImGui::DestroyContext();
2✔
91

92
  Logger::debug("[Overlay] Destroyed");
4✔
93
}
94

95
void OverlayColoredLabel::setColor(const Color& color, float alpha) {
1✔
96
  m_color = color;
1✔
97
  m_alpha = alpha;
1✔
98
}
1✔
99

100
void OverlayTextbox::setText(std::string text) {
1✔
101
  m_text = std::move(text);
1✔
102
  m_callback(m_text);
1✔
103
}
1✔
104

105
OverlayTextbox& OverlayTextbox::append(const std::string& text) {
2✔
106
  m_text += text;
2✔
107
  m_callback(m_text);
2✔
108

109
  return *this;
2✔
110
}
111

112
void OverlayTextbox::clear() {
1✔
113
  m_text.clear();
1✔
114
  m_callback(m_text);
1✔
115
}
1✔
116

117
void OverlayTextArea::setText(std::string text) {
1✔
118
  m_text = std::move(text);
1✔
119
  m_callback(m_text);
1✔
120
}
1✔
121

122
OverlayTextArea& OverlayTextArea::append(const std::string& text) {
2✔
123
  m_text += text;
2✔
124
  m_callback(m_text);
2✔
125

126
  return *this;
2✔
127
}
128

129
void OverlayTextArea::clear() {
1✔
130
  m_text.clear();
1✔
131
  m_callback(m_text);
1✔
132
}
1✔
133

134
OverlayTexture::OverlayTexture(const Texture2D& texture) noexcept
2✔
135
  : OverlayTexture(texture, texture.getWidth(), texture.getHeight()) {}
2✔
136

137
void OverlayTexture::setTexture(const Texture2D& texture, unsigned int maxWidth, unsigned int maxHeight) noexcept {
7✔
138
  m_index  = texture.getIndex();
7✔
139
  m_width  = static_cast<float>(maxWidth);
7✔
140
  m_height = static_cast<float>(maxHeight);
7✔
141
}
7✔
142

143
void OverlayTexture::setTexture(const Texture2D& texture) noexcept {
1✔
144
  setTexture(texture, texture.getWidth(), texture.getHeight());
1✔
145
}
1✔
146

147
OverlayPlotEntry& OverlayPlot::addEntry(std::string name, OverlayPlotType type) {
4✔
148
  return *m_entries.emplace_back(std::make_unique<OverlayPlotEntry>(OverlayPlotEntry(std::move(name), type, m_maxValCount)));
4✔
149
}
150

151
OverlayWindow::OverlayWindow(std::string title, const Vec2f& initSize, const Vec2f& initPos) noexcept
10✔
152
  : m_title{ std::move(title) }, m_currentSize{ initSize }, m_currentPos{ initPos } {
10✔
153
  assert("Error: The overlay window title cannot be empty." && !m_title.empty());
10✔
154
}
10✔
155

156
OverlayLabel& OverlayWindow::addLabel(std::string label) {
2✔
157
  return static_cast<OverlayLabel&>(*m_elements.emplace_back(std::make_unique<OverlayLabel>(std::move(label))));
2✔
158
}
159

160
OverlayColoredLabel& OverlayWindow::addColoredLabel(std::string label, const Color& color, float alpha) {
4✔
161
  return static_cast<OverlayColoredLabel&>(*m_elements.emplace_back(std::make_unique<OverlayColoredLabel>(std::move(label), color, alpha)));
4✔
162
}
163

164
OverlayColoredLabel& OverlayWindow::addColoredLabel(std::string label, float red, float green, float blue, float alpha) {
1✔
165
  return addColoredLabel(std::move(label), Color(red, green, blue), alpha);
1✔
166
}
167

168
OverlayButton& OverlayWindow::addButton(std::string label, std::function<void()> actionClick) {
2✔
169
  return static_cast<OverlayButton&>(*m_elements.emplace_back(std::make_unique<OverlayButton>(std::move(label), std::move(actionClick))));
2✔
170
}
171

172
OverlayCheckbox& OverlayWindow::addCheckbox(std::string label, std::function<void()> actionOn, std::function<void()> actionOff, bool initVal) {
3✔
173
  return static_cast<OverlayCheckbox&>(*m_elements.emplace_back(std::make_unique<OverlayCheckbox>(std::move(label), std::move(actionOn), std::move(actionOff),
6✔
174
                                                                                                  initVal)));
6✔
175
}
176

177
OverlaySlider& OverlayWindow::addSlider(std::string label, std::function<void(float)> actionSlide, float minValue, float maxValue, float initValue) {
2✔
178
  return static_cast<OverlaySlider&>(*m_elements.emplace_back(std::make_unique<OverlaySlider>(std::move(label), std::move(actionSlide),
4✔
179
                                                                                              minValue, maxValue, initValue)));
4✔
180
}
181

182
OverlayTextbox& OverlayWindow::addTextbox(std::string label, std::function<void(const std::string&)> callback, std::string initText) {
3✔
183
  auto& textbox = static_cast<OverlayTextbox&>(*m_elements.emplace_back(std::make_unique<OverlayTextbox>(std::move(label),
6✔
184
                                                                                                         std::move(callback),
3✔
185
                                                                                                         std::move(initText))));
6✔
186
  textbox.m_text.reserve(std::min(textbox.m_text.size(), static_cast<std::size_t>(64)));
3✔
187
  return textbox;
3✔
188
}
189

190
OverlayTextArea& OverlayWindow::addTextArea(std::string label, std::function<void(const std::string&)> callback, std::string initText, float maxHeight) {
4✔
191
  auto& textArea = static_cast<OverlayTextArea&>(*m_elements.emplace_back(std::make_unique<OverlayTextArea>(std::move(label),
8✔
192
                                                                                                            std::move(callback),
4✔
193
                                                                                                            std::move(initText),
4✔
194
                                                                                                            maxHeight)));
4✔
195
  textArea.m_text.reserve(std::min(textArea.m_text.size(), static_cast<std::size_t>(2048)));
4✔
196
  return textArea;
4✔
197
}
198

199
OverlayListBox& OverlayWindow::addListBox(std::string label, std::vector<std::string> entries,
3✔
200
                                          std::function<void(const std::string&, std::size_t)> actionChanged, std::size_t initId) {
201
  return static_cast<OverlayListBox&>(*m_elements.emplace_back(std::make_unique<OverlayListBox>(std::move(label), std::move(entries),
6✔
202
                                                                                                std::move(actionChanged), initId)));
9✔
203
}
204

205
OverlayDropdown& OverlayWindow::addDropdown(std::string label, std::vector<std::string> entries,
3✔
206
                                            std::function<void(const std::string&, std::size_t)> actionChanged, std::size_t initId) {
207
  return static_cast<OverlayDropdown&>(*m_elements.emplace_back(std::make_unique<OverlayDropdown>(std::move(label), std::move(entries),
6✔
208
                                                                                                  std::move(actionChanged), initId)));
9✔
209
}
210

211
OverlayColorPicker& OverlayWindow::addColorPicker(std::string label, std::function<void(const Color&)> actionChanged, const Color& initColor) {
2✔
212
  return static_cast<OverlayColorPicker&>(*m_elements.emplace_back(std::make_unique<OverlayColorPicker>(std::move(label),
4✔
213
                                                                                                        std::move(actionChanged),
2✔
214
                                                                                                        initColor)));
4✔
215
}
216

217
OverlayTexture& OverlayWindow::addTexture(const Texture2D& texture, unsigned int maxWidth, unsigned int maxHeight) {
2✔
218
  return static_cast<OverlayTexture&>(*m_elements.emplace_back(std::make_unique<OverlayTexture>(texture, maxWidth, maxHeight)));
2✔
219
}
220

221
OverlayTexture& OverlayWindow::addTexture(const Texture2D& texture) {
1✔
222
  return static_cast<OverlayTexture&>(*m_elements.emplace_back(std::make_unique<OverlayTexture>(texture)));
1✔
223
}
224

225
OverlayProgressBar& OverlayWindow::addProgressBar(int minVal, int maxVal, bool showValues) {
3✔
226
  return static_cast<OverlayProgressBar&>(*m_elements.emplace_back(std::make_unique<OverlayProgressBar>(minVal, maxVal, showValues)));
3✔
227
}
228

229
OverlayPlot& OverlayWindow::addPlot(std::string label, std::size_t maxValCount,
8✔
230
                                    std::string xAxisLabel, std::string yAxisLabel,
231
                                    float minYVal, float maxYVal, bool lockYAxis,
232
                                    float maxHeight) {
233
  return static_cast<OverlayPlot&>(*m_elements.emplace_back(std::make_unique<OverlayPlot>(std::move(label), maxValCount,
16✔
234
                                                                                          std::move(xAxisLabel), std::move(yAxisLabel),
8✔
235
                                                                                          minYVal, maxYVal, lockYAxis,
236
                                                                                          maxHeight)));
16✔
237
}
238

239
OverlaySeparator& OverlayWindow::addSeparator() {
1✔
240
  return static_cast<OverlaySeparator&>(*m_elements.emplace_back(std::make_unique<OverlaySeparator>()));
1✔
241
}
242

243
OverlayFrameTime& OverlayWindow::addFrameTime(std::string formattedLabel) {
1✔
244
  return static_cast<OverlayFrameTime&>(*m_elements.emplace_back(std::make_unique<OverlayFrameTime>(std::move(formattedLabel))));
1✔
245
}
246

247
OverlayFpsCounter& OverlayWindow::addFpsCounter(std::string formattedLabel) {
1✔
248
  return static_cast<OverlayFpsCounter&>(*m_elements.emplace_back(std::make_unique<OverlayFpsCounter>(std::move(formattedLabel))));
1✔
249
}
250

251
void OverlayWindow::render() const {
14✔
252
  ZoneScopedN("OverlayWindow::render");
253

254
  if (!m_enabled)
14✔
255
    return;
7✔
256

257
  ImGui::SetNextWindowSize(ImVec2(m_currentSize.x(), m_currentSize.y()), ImGuiCond_Once);
7✔
258
  ImGui::SetNextWindowPos(ImVec2(m_currentPos.x(), m_currentPos.y()), ImGuiCond_Once);
7✔
259
  ImGui::Begin(m_title.c_str(), nullptr, (m_currentSize.x() < 0.f && m_currentSize.y() < 0.f ? ImGuiWindowFlags_AlwaysAutoResize : ImGuiWindowFlags_None));
7✔
260

261
  for (const auto& element : m_elements) {
22✔
262
    if (!element->isEnabled())
15✔
263
      continue;
×
264

265
    switch (element->getType()) {
15✔
266
      case OverlayElementType::LABEL:
1✔
267
        ImGui::PushTextWrapPos();
1✔
268
        ImGui::TextUnformatted(element->m_label.c_str());
1✔
269
        ImGui::PopTextWrapPos();
1✔
270
        break;
1✔
271

272
      case OverlayElementType::COLORED_LABEL:
2✔
273
      {
274
        const auto& label = static_cast<OverlayColoredLabel&>(*element);
2✔
275
        ImGui::PushTextWrapPos();
2✔
276

277
        const Vec3f& colorVec = label.m_color;
2✔
278
        ImGui::TextColored(ImVec4(colorVec.x(), colorVec.y(), colorVec.z(), label.m_alpha), "%s", element->m_label.c_str());
2✔
279

280
        ImGui::PopTextWrapPos();
2✔
281
        break;
2✔
282
      }
283

284
      case OverlayElementType::BUTTON:
1✔
285
      {
286
        const auto& button = static_cast<OverlayButton&>(*element);
1✔
287

288
        if (ImGui::Button(button.m_label.c_str()))
1✔
289
          button.m_actionClick();
×
290

291
        break;
1✔
292
      }
293

294
      case OverlayElementType::CHECKBOX:
2✔
295
      {
296
        auto& checkbox = static_cast<OverlayCheckbox&>(*element);
2✔
297
        const bool prevValue = checkbox.m_isChecked;
2✔
298

299
        ImGui::Checkbox(checkbox.m_label.c_str(), &checkbox.m_isChecked);
2✔
300

301
        if (checkbox.m_isChecked != prevValue) {
2✔
302
          if (checkbox.m_isChecked)
×
303
            checkbox.m_actionOn();
×
304
          else
305
            checkbox.m_actionOff();
×
306
        }
307

308
        break;
2✔
309
      }
310

311
      case OverlayElementType::SLIDER:
1✔
312
      {
313
        auto& slider = static_cast<OverlaySlider&>(*element);
1✔
314

315
        ImGui::SetNextItemWidth(std::min(ImGui::CalcItemWidth(), 210.f));
1✔
316
        if (ImGui::SliderFloat(slider.m_label.c_str(), &slider.m_currentValue, slider.m_minValue, slider.m_maxValue))
1✔
317
          slider.m_actionSlide(slider.m_currentValue);
×
318

319
        break;
1✔
320
      }
321

322
      case OverlayElementType::TEXTBOX:
1✔
323
      {
324
        auto& textbox = static_cast<OverlayTextbox&>(*element);
1✔
325

326
        if (ImGui::InputText(textbox.m_label.c_str(), &textbox.m_text))
1✔
327
          textbox.m_callback(textbox.m_text);
×
328

329
        break;
1✔
330
      }
331

332
      case OverlayElementType::TEXT_AREA:
1✔
333
      {
334
        auto& textArea = static_cast<OverlayTextArea&>(*element);
1✔
335

336
        if (ImGui::InputTextMultiline(textArea.m_label.c_str(),
1✔
337
                                      &textArea.m_text,
338
                                      ImVec2(-1.f, textArea.m_maxHeight),
2✔
339
                                      ImGuiInputTextFlags_AllowTabInput)) {
340
          textArea.m_callback(textArea.m_text);
×
341
        }
342

343
        break;
1✔
344
      }
345

346
      case OverlayElementType::LIST_BOX:
1✔
347
      {
348
        auto& listBox = static_cast<OverlayListBox&>(*element);
1✔
349

350
        // The list box will get a default width, while being automatically resized vertically up to 5 elements
351
        // The stride added is to avoid showing a scrollbar when having few entries. Its value is directly defined here,
352
        //  but may be required to be ImGui::GetStyle().ItemSpacing.y / 2
353
        const ImVec2 dimensions(0, ImGui::GetTextLineHeightWithSpacing() * std::min(static_cast<float>(listBox.m_entries.size()), 5.f) + 2.f);
1✔
354

355
        if (ImGui::BeginListBox(listBox.m_label.c_str(), dimensions)) {
1✔
356
          for (std::size_t entryIndex = 0; entryIndex < listBox.m_entries.size(); ++entryIndex) {
3✔
357
            const bool isSelected = (listBox.m_currentId == entryIndex);
2✔
358

359
            if (ImGui::Selectable(listBox.m_entries[entryIndex].c_str(), isSelected)) {
2✔
360
              if (!isSelected) { // If the item isn't already selected
×
361
                listBox.m_actionChanged(listBox.m_entries[entryIndex], entryIndex);
×
362
                listBox.m_currentId = entryIndex;
×
363
              }
364
            }
365

366
            if (isSelected)
2✔
367
              ImGui::SetItemDefaultFocus();
1✔
368
          }
369

370
          ImGui::EndListBox();
1✔
371
        }
372

373
        break;
1✔
374
      }
375

376
      case OverlayElementType::DROPDOWN:
1✔
377
      {
378
        auto& dropdown = static_cast<OverlayDropdown&>(*element);
1✔
379

380
        const char* preview = (dropdown.m_currentId < dropdown.m_entries.size() ? dropdown.m_entries[dropdown.m_currentId].c_str() : nullptr);
1✔
381
        if (ImGui::BeginCombo(dropdown.m_label.c_str(), preview)) {
1✔
382
          for (std::size_t entryIndex = 0; entryIndex < dropdown.m_entries.size(); ++entryIndex) {
×
383
            const bool isSelected = (dropdown.m_currentId == entryIndex);
×
384

385
            if (ImGui::Selectable(dropdown.m_entries[entryIndex].c_str(), isSelected)) {
×
386
              if (!isSelected) { // If the item isn't already selected
×
387
                dropdown.m_actionChanged(dropdown.m_entries[entryIndex], entryIndex);
×
388
                dropdown.m_currentId = entryIndex;
×
389
              }
390
            }
391

392
            if (isSelected)
×
393
              ImGui::SetItemDefaultFocus();
×
394
          }
395

396
          ImGui::EndCombo();
×
397
        }
398

399
        break;
1✔
400
      }
401

402
      case OverlayElementType::COLOR_PICKER:
1✔
403
      {
404
        auto& colorPicker = static_cast<OverlayColorPicker&>(*element);
1✔
405

406
        if (ImGui::ColorEdit3(colorPicker.m_label.c_str(), colorPicker.m_currentColor.data()))
2✔
407
          colorPicker.m_actionChanged(Color(colorPicker.m_currentColor[0], colorPicker.m_currentColor[1], colorPicker.m_currentColor[2]));
×
408

409
        break;
1✔
410
      }
411

412
      case OverlayElementType::TEXTURE:
1✔
413
      {
414
        auto& texture = static_cast<OverlayTexture&>(*element);
1✔
415
        assert("Error: The given texture is invalid." && Renderer::isTexture(texture.m_index));
1✔
416

417
        const float minRatio = std::min(ImGui::GetWindowWidth() / texture.m_width, ImGui::GetWindowHeight() / texture.m_height);
1✔
418
        const ImVec2 textureSize(std::min(texture.m_width, texture.m_width * minRatio),
2✔
419
                                 std::min(texture.m_height, texture.m_height * minRatio));
1✔
420

421
        // The UV's y component must be reverted so that the texture isn't flipped upside down
422
        const ImVec2 topCoords(0.f, 1.f);
1✔
423
        const ImVec2 bottomCoords(1.f, 0.f);
1✔
424

425
        ImGui::Image(reinterpret_cast<void*>(static_cast<intptr_t>(texture.m_index)), textureSize, topCoords, bottomCoords);
1✔
426

427
        break;
1✔
428
      }
429

430
      case OverlayElementType::PROGRESS_BAR:
1✔
431
      {
432
        auto& progressBar = static_cast<OverlayProgressBar&>(*element);
1✔
433

434
        const std::string text = (progressBar.m_showValues ? std::to_string(progressBar.m_curVal) + '/' + std::to_string(progressBar.m_maxVal) : std::string());
1✔
435
        ImGui::ProgressBar(static_cast<float>(progressBar.m_minVal + progressBar.m_curVal) / static_cast<float>(progressBar.m_maxVal),
2✔
436
                           ImVec2(-1.f, 0.f),
×
437
                           (text.empty() ? nullptr : text.c_str()));
2✔
438

439
        break;
1✔
440
      }
1✔
441

442
      case OverlayElementType::PLOT:
1✔
443
      {
444
        auto& plot = static_cast<OverlayPlot&>(*element);
1✔
445

446
        if (ImPlot::BeginPlot(plot.m_label.c_str(), ImVec2(-1, plot.m_maxHeight), ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect)) {
1✔
447
          ImPlot::SetupAxes(plot.m_xAxisLabel.c_str(), plot.m_yAxisLabel.c_str(),
1✔
448
                            ImPlotAxisFlags_NoTickLabels, (plot.m_lockY ? ImPlotAxisFlags_Lock : ImPlotAxisFlags_None));
1✔
449
          ImPlot::SetupAxisLimits(ImAxis_X1, 0.0, static_cast<double>(plot.m_maxValCount - 1), ImPlotCond_Always);
1✔
450
          ImPlot::SetupAxisLimits(ImAxis_Y1, static_cast<double>(plot.m_minYVal), static_cast<double>(plot.m_maxYVal), ImPlotCond_Once);
1✔
451
          ImPlot::SetupMouseText(ImPlotLocation_NorthEast);
1✔
452

453
          for (const std::unique_ptr<OverlayPlotEntry>& entry : plot.m_entries) {
3✔
454
            if (entry->m_type == OverlayPlotType::SHADED) {
2✔
455
              ImPlot::SetNextFillStyle(IMPLOT_AUTO_COL, 0.5f);
1✔
456
              ImPlot::PlotShaded(entry->m_name.c_str(), entry->m_values.data(), static_cast<int>(entry->m_values.size()));
1✔
457
            } else {
458
              ImPlot::PlotLine(entry->m_name.c_str(), entry->m_values.data(), static_cast<int>(entry->m_values.size()));
1✔
459
            }
460
          }
461

462
          ImPlot::EndPlot();
1✔
463
        }
464

465
        break;
1✔
466
      }
467

468
      case OverlayElementType::SEPARATOR:
×
469
        ImGui::Separator();
×
470
        break;
×
471

472
      case OverlayElementType::FRAME_TIME:
×
473
        ImGui::Text(element->m_label.c_str(), static_cast<double>(1000.f / ImGui::GetIO().Framerate));
×
474
        break;
×
475

476
      case OverlayElementType::FPS_COUNTER:
×
477
        ImGui::Text(element->m_label.c_str(), static_cast<double>(ImGui::GetIO().Framerate));
×
478
        break;
×
479

480
      default:
×
481
        break;
×
482
    }
483
  }
484

485
  ImGui::End();
7✔
486
}
487

488
} // namespace Raz
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc