From 7be79a9c9617c159571812ea136f50f23170c368 Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Mon, 13 Apr 2020 15:15:53 +0200 Subject: [PATCH] Switch to OpenGL 3.3 --- RenderingManager.cpp | 4 ++-- UserInterfaceManager.cpp | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/RenderingManager.cpp b/RenderingManager.cpp index 9f6e82f..c314f85 100644 --- a/RenderingManager.cpp +++ b/RenderingManager.cpp @@ -76,10 +76,10 @@ bool Rendering::Init() return false; } - // Decide GL+GLSL versions GL 3.2 + GLSL 150 + // Decide GL+GLSL versions GL 3.3 + GLSL 150 glsl_version = "#version 150"; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only #if __APPLE__ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // Required on Mac diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index f1bfc6a..746c0dc 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -473,7 +473,7 @@ void MainWindow::StartScreenshot() static void ShowAboutOpengl(bool* p_open) { - if (!ImGui::Begin("About OpenGL", p_open, ImGuiWindowFlags_AlwaysAutoResize)) + if (!ImGui::Begin("About OpenGL", p_open, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::End(); return; @@ -481,7 +481,6 @@ static void ShowAboutOpengl(bool* p_open) ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("OpenGL %s", glGetString(GL_VERSION) ); - ImGui::Text("%s %s", glGetString(GL_RENDERER), glGetString(GL_VENDOR)); ImGui::PopFont(); ImGui::Separator(); ImGui::Text("OpenGL is the premier environment for developing portable, \ninteractive 2D and 3D graphics applications."); @@ -513,7 +512,9 @@ static void ShowAboutOpengl(bool* p_open) ImGui::LogText("```\n"); } - ImGui::Text("OpenGL Extensions (runtime) :"); + ImGui::Text("OpenGL %s", glGetString(GL_VERSION) ); + ImGui::Text("%s %s", glGetString(GL_RENDERER), glGetString(GL_VENDOR)); + ImGui::Text("Extensions (runtime) :"); GLint numExtensions = 0; glGetIntegerv( GL_NUM_EXTENSIONS, &numExtensions ); @@ -539,7 +540,7 @@ static void ShowAboutOpengl(bool* p_open) static void ShowAboutGStreamer(bool* p_open) { - if (!ImGui::Begin("About Gstreamer", p_open, ImGuiWindowFlags_AlwaysAutoResize)) + if (!ImGui::Begin("About Gstreamer", p_open, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::End(); return; @@ -576,7 +577,8 @@ static void ShowAboutGStreamer(bool* p_open) ImGui::LogText("```\n"); } - ImGui::Text("GStreamer Plugins & features (runtime) :"); + ImGui::Text("GStreamer %s", GstToolkit::gst_version().c_str()); + ImGui::Text("Plugins & features (runtime) :"); std::list filteredlist;