From 47c7be77915f84b958bb274bbc53fe0507114ef1 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Tue, 13 Apr 2021 16:44:46 -0700 Subject: [PATCH] Protect OpenGL attributes shared by ImGui and OSG (#1558) --- .ci/travis/docs_versions.txt | 2 +- CHANGELOG.md | 6 ++++++ dart/external/imgui/imgui_impl_opengl2.cpp | 14 ++++++++++++++ package.xml | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.ci/travis/docs_versions.txt b/.ci/travis/docs_versions.txt index 0156436c704f9..f78ad2c554ae1 100644 --- a/.ci/travis/docs_versions.txt +++ b/.ci/travis/docs_versions.txt @@ -1,5 +1,5 @@ DART 6 -v6.10.0 +v6.10.1 v6.9.5 v6.8.5 v6.7.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index b0ec47e4676ba..4a5318d2ebc4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## DART 6 +### [DART 6.10.1 (2021-04-13)](https://github.com/dartsim/dart/milestone/65?closed=1) + +* GUI + + * Protect OpenGL attributes shared by ImGui and OSG: [#1558](https://github.com/dartsim/dart/pull/1558) + ### [DART 6.10.0 (2021-04-09)](https://github.com/dartsim/dart/milestone/58?closed=1) * Common diff --git a/dart/external/imgui/imgui_impl_opengl2.cpp b/dart/external/imgui/imgui_impl_opengl2.cpp index b062697bcfa14..6cd2f469efbd0 100644 --- a/dart/external/imgui/imgui_impl_opengl2.cpp +++ b/dart/external/imgui/imgui_impl_opengl2.cpp @@ -85,6 +85,13 @@ static void ImGui_ImplOpenGL2_SetupRenderState(ImDrawData* draw_data, int fb_wid glDisable(GL_LIGHTING); glDisable(GL_COLOR_MATERIAL); glEnable(GL_SCISSOR_TEST); + //--------------------------- + // [BEGIN] Modified for DART + //--------------------------- + glPushClientAttrib(GL_VERTEX_ARRAY | GL_TEXTURE_COORD_ARRAY | GL_COLOR_ARRAY); + //--------------------------- + // [END] Modified for DART + //--------------------------- glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_COLOR_ARRAY); @@ -187,6 +194,13 @@ void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data) glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); + //--------------------------- + // [BEGIN] Modified for DART + //--------------------------- + glPopClientAttrib(); + //--------------------------- + // [END] Modified for DART + //--------------------------- glBindTexture(GL_TEXTURE_2D, (GLuint)last_texture); glMatrixMode(GL_MODELVIEW); glPopMatrix(); diff --git a/package.xml b/package.xml index 8b016134b34b9..558f4b4a91163 100644 --- a/package.xml +++ b/package.xml @@ -4,7 +4,7 @@ a Catkin workspace. Catkin is not required to build DART. For more information, see: http://ros.org/reps/rep-0136.html --> dartsim - 6.10.0 + 6.10.1 DART (Dynamic Animation and Robotics Toolkit) is a collaborative, cross-platform, open source library created by the Georgia Tech Graphics