Skip to content

Commit

Permalink
Protect OpenGL attributes shared by ImGui and OSG (#1558)
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Apr 13, 2021
1 parent bff098b commit 47c7be7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/travis/docs_versions.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DART 6
v6.10.0
v6.10.1
v6.9.5
v6.8.5
v6.7.3
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 14 additions & 0 deletions dart/external/imgui/imgui_impl_opengl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
<name>dartsim</name>
<version>6.10.0</version>
<version>6.10.1</version>
<description>
DART (Dynamic Animation and Robotics Toolkit) is a collaborative,
cross-platform, open source library created by the Georgia Tech Graphics
Expand Down

0 comments on commit 47c7be7

Please sign in to comment.