Commit bf434e6d authored by Jan Möbius's avatar Jan Möbius
Browse files

Removed glutSolidSphere calls

parent f9b229fc
...@@ -251,7 +251,9 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode * ...@@ -251,7 +251,9 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode *
if(_state.compatibilityProfile()) if(_state.compatibilityProfile())
{ {
ACG::GLState::shadeModel(GL_SMOOTH); ACG::GLState::shadeModel(GL_SMOOTH);
glutSolidSphere(2*cylinder_radius_, 20, 20); _state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_);
ACG::GLSphere sphere(20, 20);
sphere.draw_primitive();
} }
_state.pop_modelview_matrix(); _state.pop_modelview_matrix();
...@@ -546,29 +548,32 @@ ManipulatorNode::mapToCylinder(GLState& _state, ...@@ -546,29 +548,32 @@ ManipulatorNode::mapToCylinder(GLState& _state,
void ManipulatorNode::pick(GLState& _state, PickTarget _target) { void ManipulatorNode::pick(GLState& _state, PickTarget _target) {
if (_target == PICK_FACE || _target == PICK_ANYTHING) { if (_target == PICK_FACE || _target == PICK_ANYTHING) {
if (draw_cylinder_) { if (draw_cylinder_) {
_state.pick_set_maximum(2); _state.pick_set_maximum(2);
// cylinder // cylinder
_state.push_modelview_matrix(); _state.push_modelview_matrix();
setup_cylinder_system(_state); setup_cylinder_system(_state);
_state.pick_set_name(0); _state.pick_set_name(0);
cylinder_->setBottomRadius(cylinder_radius_); cylinder_->setBottomRadius(cylinder_radius_);
cylinder_->setTopRadius(cylinder_radius_); cylinder_->setTopRadius(cylinder_radius_);
cylinder_->draw(_state, cylinder_height_); cylinder_->draw(_state, cylinder_height_);
_state.pop_modelview_matrix(); _state.pop_modelview_matrix();
// sphere // sphere
_state.push_modelview_matrix(); _state.push_modelview_matrix();
setup_sphere_system(_state); setup_sphere_system(_state);
_state.pick_set_name(1); _state.pick_set_name(1);
if(_state.compatibilityProfile()) if(_state.compatibilityProfile()) {
glutSolidSphere(2* cylinder_radius_ , 20, 20); _state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_);
_state.pop_modelview_matrix(); ACG::GLSphere sphere(20, 20);
} sphere.draw_primitive();
} }
_state.pop_modelview_matrix();
}
}
} }
......
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