From 8ab2a0d0738414e1f37338ff2c6845638aef28ee Mon Sep 17 00:00:00 2001 From: David Chavez Date: Mon, 30 May 2022 20:23:06 +0200 Subject: [PATCH] =?UTF-8?q?Let=E2=80=99s=20use=20OpenGL=203=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libultraship/Makefile | 1 - .../Lib/ImGui/backends/imgui_impl_opengl3.cpp | 4 ++-- libultraship/libultraship/SohImGuiImpl.cpp | 17 ----------------- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/libultraship/Makefile b/libultraship/Makefile index b1bc0f691..5fa6bfe39 100644 --- a/libultraship/Makefile +++ b/libultraship/Makefile @@ -56,7 +56,6 @@ CXX_FILES := \ $(shell find libultraship/Lib/Fast3D -name *.cpp) \ $(shell find libultraship -maxdepth 1 -name *.cpp) \ $(shell find libultraship/Lib/ImGui -maxdepth 1 -name *.cpp) \ - libultraship/Lib/ImGui/backends/imgui_impl_opengl2.cpp \ libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp \ libultraship/Lib/ImGui/backends/imgui_impl_sdl.cpp \ libultraship/Lib/StrHash64.cpp \ diff --git a/libultraship/libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp b/libultraship/libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp index c1d182c07..9ff0e80c2 100644 --- a/libultraship/libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp +++ b/libultraship/libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp @@ -220,9 +220,9 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version) if (imgl3wInit() != 0) { fprintf(stderr, "Failed to initialize OpenGL loader!\n"); -//#ifndef __APPLE__ // this is ok due to shared library cache +#ifndef __APPLE__ // this is ok due to shared library cache return false; -//#endif +#endif } #endif diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 84149fcfc..8e4becaab 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -27,13 +27,8 @@ #include "Utils/StringHelper.h" #ifdef ENABLE_OPENGL -#ifdef __APPLE__ -#include "Lib/ImGui/backends/imgui_impl_opengl2.h" -#include "Lib/ImGui/backends/imgui_impl_sdl.h" -#else #include "Lib/ImGui/backends/imgui_impl_opengl3.h" #include "Lib/ImGui/backends/imgui_impl_sdl.h" -#endif #endif @@ -158,11 +153,7 @@ namespace SohImGui { void ImGuiBackendInit() { switch (impl.backend) { case Backend::SDL: -#ifdef __APPLE__ - ImGui_ImplOpenGL2_Init(); -#else ImGui_ImplOpenGL3_Init("#version 120"); -#endif break; #if defined(ENABLE_DX11) || defined(ENABLE_DX12) @@ -208,11 +199,7 @@ namespace SohImGui { void ImGuiBackendNewFrame() { switch (impl.backend) { case Backend::SDL: -#ifdef __APPLE__ - ImGui_ImplOpenGL2_NewFrame(); -#else ImGui_ImplOpenGL3_NewFrame(); -#endif break; #if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: @@ -227,11 +214,7 @@ namespace SohImGui { void ImGuiRenderDrawData(ImDrawData* data) { switch (impl.backend) { case Backend::SDL: -#ifdef __APPLE__ - ImGui_ImplOpenGL2_RenderDrawData(data); -#else ImGui_ImplOpenGL3_RenderDrawData(data); -#endif break; #if defined(ENABLE_DX11) || defined(ENABLE_DX12) case Backend::DX11: