Skip to content

Commit

Permalink
Show info only on debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
dvsku committed Feb 9, 2024
1 parent e8f3c50 commit 8d40881
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/devue_core/src/graphics/dv_opengl_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static LRESULT CALLBACK redirect_callback(HWND hWnd, UINT uMsg, WPARAM wParam, L
return dv_opengl_window::wndproc_callback(open_gl_wnd, hWnd, uMsg, wParam, lParam);
}

static std::string _get_imgui_ver() {
static std::string get_imgui_version() {
std::string str = std::string(ImGui::GetVersion());

#ifdef IMGUI_HAS_DOCK
Expand Down Expand Up @@ -108,9 +108,11 @@ void dv_opengl_window::run() {
ImGui_ImplGlfw_InitForOpenGL(m_native, true);
ImGui_ImplOpenGL3_Init();

DV_LOG("OpenGL version: {}" , (char*)glGetString(GL_VERSION));
DV_LOG("OpenGL renderer: {}" , (char*)glGetString(GL_RENDERER));
DV_LOG("ImGUI version: {}\n", _get_imgui_ver());
#ifndef NDEBUG
DV_LOG("OpenGL version: {}", (char*)glGetString(GL_VERSION));
DV_LOG("OpenGL renderer: {}", (char*)glGetString(GL_RENDERER));
DV_LOG("ImGUI version: {}", get_imgui_version());
#endif

// Cancel running if prepare failed
if (!prepare()) return;
Expand Down

0 comments on commit 8d40881

Please sign in to comment.