فهرست منبع

Examples: Fix d749d49903fb0eb56b08961d989ed90a9d97c28b missing the deletion code. (#1217)

omar 7 سال پیش
والد
کامیت
d7f97922b8
2فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 1 0
      examples/opengl3_example/imgui_impl_glfw_gl3.cpp
  2. 1 0
      examples/sdl_opengl3_example/imgui_impl_sdl_gl3.cpp

+ 1 - 0
examples/opengl3_example/imgui_impl_glfw_gl3.cpp

@@ -157,6 +157,7 @@ void ImGui_ImplGlfwGL3_RenderDrawData(ImDrawData* draw_data)
             idx_buffer_offset += pcmd->ElemCount;
         }
     }
+    glDeleteVertexArrays(1, &vao_handle);
 
     // Restore modified GL state
     glUseProgram(last_program);

+ 1 - 0
examples/sdl_opengl3_example/imgui_impl_sdl_gl3.cpp

@@ -151,6 +151,7 @@ void ImGui_ImplSdlGL3_RenderDrawData(ImDrawData* draw_data)
             idx_buffer_offset += pcmd->ElemCount;
         }
     }
+    glDeleteVertexArrays(1, &vao_handle);
 
     // Restore modified GL state
     glUseProgram(last_program);