diff --git a/src/common/gl/context.cpp b/src/common/gl/context.cpp index 33f480159..34d1c91a9 100644 --- a/src/common/gl/context.cpp +++ b/src/common/gl/context.cpp @@ -77,6 +77,14 @@ static void DisableBrokenExtensions(const char* gl_vendor, const char* gl_render GLAD_GL_EXT_disjoint_timer_query = 0; } } + + // If we're missing GLES 3.2, but have OES_draw_elements_base_vertex, redirect the function pointers. + if (!glad_glDrawElementsBaseVertex && GLAD_GL_OES_draw_elements_base_vertex && !GLAD_GL_ES_VERSION_3_2) + { + glad_glDrawElementsBaseVertex = glad_glDrawElementsBaseVertexOES; + glad_glDrawRangeElementsBaseVertex = glad_glDrawRangeElementsBaseVertexOES; + glad_glDrawElementsInstancedBaseVertex = glad_glDrawElementsInstancedBaseVertexOES; + } } Context::Context(const WindowInfo& wi) : m_wi(wi) {} diff --git a/src/frontend-common/imgui_impl_opengl3.cpp b/src/frontend-common/imgui_impl_opengl3.cpp index 888782a42..6385e40fa 100644 --- a/src/frontend-common/imgui_impl_opengl3.cpp +++ b/src/frontend-common/imgui_impl_opengl3.cpp @@ -106,6 +106,8 @@ // GL includes #include "common/gl/loader.h" #include "common/gl/texture.h" +#include "common/log.h" +Log_SetChannel(ImGui_ImplOpenGL3); // OpenGL Data struct ImGui_ImplOpenGL3_Data @@ -168,6 +170,13 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version) IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(bd->GlslVersionString)); strcpy(bd->GlslVersionString, glsl_version); strcat(bd->GlslVersionString, "\n"); + + if (!glDrawElementsBaseVertex) + { + Log_ErrorPrintf("Missing glDrawElementsBaseVertex()"); + return false; + } + return ImGui_ImplOpenGL3_CreateDeviceObjects(); }