Commit 33d686d8 authored by Jan Möbius's avatar Jan Möbius

Fixed last commit

parent 6a4c7020
...@@ -222,13 +222,14 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode * ...@@ -222,13 +222,14 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode *
if(_state.compatibilityProfile()) if(_state.compatibilityProfile())
{ {
ACG::GLState::shadeModel(GL_SMOOTH); ACG::GLState::shadeModel(GL_SMOOTH);
GLint mode = 0; GLint previous[2];
glGetIntegerv(GL_POLYGON_MODE,&mode); glGetIntegerv(GL_POLYGON_MODE,previous);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
_state.scale(cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_); _state.scale(cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_);
ACG::GLSphere sphere(20, 20); ACG::GLSphere sphere(20, 20);
sphere.draw_primitive(); sphere.draw_primitive();
glPolygonMode(GL_FRONT_AND_BACK,mode); glPolygonMode(GL_FRONT,previous[0]);
glPolygonMode(GL_BACK,previous[1]);
} }
} }
......
...@@ -80,12 +80,13 @@ TrackballNode::draw(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawM ...@@ -80,12 +80,13 @@ TrackballNode::draw(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawM
glTranslatef(center()[0], center()[1], center()[2]); glTranslatef(center()[0], center()[1], center()[2]);
glScalef(radius_, radius_, radius_); glScalef(radius_, radius_, radius_);
GLint mode = 0; GLint previous[2];
glGetIntegerv(GL_POLYGON_MODE,&mode); glGetIntegerv(GL_POLYGON_MODE,previous);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
ACG::GLSphere sphere(20, 20); ACG::GLSphere sphere(20, 20);
sphere.draw_primitive(); sphere.draw_primitive();
glPolygonMode(GL_FRONT_AND_BACK,mode); glPolygonMode(GL_FRONT,previous[0]);
glPolygonMode(GL_BACK,previous[1]);
glPopMatrix(); glPopMatrix();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment