From 8df7388db1995a79abe78151b2c993a24fe84f1d Mon Sep 17 00:00:00 2001 From: milek7 Date: Sat, 30 Jan 2021 01:36:39 +0100 Subject: [PATCH] we do not use separate sampler binding, do not save them in imgui3 (also fixes gl3.0 context) --- imgui/imgui_impl_opengl3.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/imgui/imgui_impl_opengl3.cpp b/imgui/imgui_impl_opengl3.cpp index c2da0c4a..519bff27 100644 --- a/imgui/imgui_impl_opengl3.cpp +++ b/imgui/imgui_impl_opengl3.cpp @@ -159,9 +159,6 @@ static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_wid glUseProgram(g_ShaderHandle); glUniform1i(g_AttribLocationTex, 0); glUniformMatrix4fv(g_AttribLocationProjMtx, 1, GL_FALSE, &ortho_projection[0][0]); -#ifdef GL_SAMPLER_BINDING - glBindSampler(0, 0); // We use combined texture/sampler state. Applications using GL 3.3 may set that otherwise. -#endif (void)vertex_array_object; #ifndef IMGUI_IMPL_OPENGL_ES2 @@ -195,9 +192,6 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data) glActiveTexture(GL_TEXTURE0); GLint last_program; glGetIntegerv(GL_CURRENT_PROGRAM, &last_program); GLint last_texture; glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture); -#ifdef GL_SAMPLER_BINDING - GLint last_sampler; glGetIntegerv(GL_SAMPLER_BINDING, &last_sampler); -#endif GLint last_array_buffer; glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_array_buffer); #ifndef IMGUI_IMPL_OPENGL_ES2 GLint last_vertex_array_object; glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array_object); @@ -297,9 +291,6 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data) // Restore modified GL state glUseProgram(last_program); glBindTexture(GL_TEXTURE_2D, last_texture); -#ifdef GL_SAMPLER_BINDING - glBindSampler(0, last_sampler); -#endif glActiveTexture(last_active_texture); #ifndef IMGUI_IMPL_OPENGL_ES2 glBindVertexArray(last_vertex_array_object);