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

Removed todo. refs #1286

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15841 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 01745b28
......@@ -392,8 +392,6 @@ void
GlutPrimitiveNode::
getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawMode& _drawMode , const Material* _mat) {
// TODO: Color is incorrect!
// init base render object
RenderObject ro;
memset(&ro, 0, sizeof(RenderObject));
......@@ -409,19 +407,19 @@ getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawM
for (int i = 0; i < (int)primitives_.size(); ++i)
{
// Set the right position
_state.push_modelview_matrix();
_state.translate(primitives_[i].position);
ro.modelview = _state.modelview();
_state.pop_modelview_matrix();
// Set the right position
_state.push_modelview_matrix();
_state.translate(primitives_[i].position);
ro.modelview = _state.modelview();
_state.pop_modelview_matrix();
Material localMaterial = *_mat;
localMaterial.color(primitives_[i].color);
localMaterial.ambientColor(primitives_[i].color);
localMaterial.diffuseColor(primitives_[i].color);
localMaterial.baseColor(primitives_[i].color);
Material localMaterial = *_mat;
localMaterial.color(primitives_[i].color);
localMaterial.ambientColor(primitives_[i].color);
localMaterial.diffuseColor(primitives_[i].color);
localMaterial.baseColor(primitives_[i].color);
ro.setMaterial(&localMaterial);
ro.setMaterial(&localMaterial);
switch (primitives_[i].type) {
case SPHERE:
......
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