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

Another unsuccesful try to get the colors for the sphere. refs #1286

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15837 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a9000180
......@@ -398,10 +398,6 @@ getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawM
RenderObject ro;
memset(&ro, 0, sizeof(RenderObject));
ro.initFromState(&_state);
ro.setMaterial(_mat);
for (int i = 0; i < (int)primitives_.size(); ++i)
{
......@@ -412,15 +408,13 @@ getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawM
ro.modelview = _state.modelview();
_state.pop_modelview_matrix();
Material localMaterial;
Material localMaterial = *_mat;
localMaterial.color(primitives_[i].color);
localMaterial.ambientColor(primitives_[i].color);
localMaterial.diffuseColor(primitives_[i].color);
ro.setMaterial(&localMaterial);
switch (primitives_[i].type) {
case SPHERE:
// Sphere
......@@ -433,6 +427,7 @@ getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawM
default:
// TODO: The other glut primitives are not yet supported by the advanced renderers
std::cerr << "Sorry, but the glut renderer objects are not available for this renderer yet!" << std::endl;
break;
}
......
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