Commit 7b1950f2 authored by Jan Möbius's avatar Jan Möbius

Fixed shading of coordsys node in new shader pipeline

closes #2523



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21072 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 178fb8f3
......@@ -199,13 +199,19 @@ void CoordsysNode::drawCoordsys(IRenderer* _renderer, RenderObject* _baseRO)
// Origin
_baseRO->debugName = "coordsys.sphere";
_baseRO->emissive = Vec3f(1.0f, 1.0f, 1.0f);
_baseRO->emissive = Vec3f(0.4f, 0.4f, 0.4f);
_baseRO->diffuse = Vec3f(0.3f, 0.3f, 0.3f);
_baseRO->specular = Vec3f(0.2f, 0.2f, 0.2f);
_baseRO->ambient = Vec3f(0.1f, 0.1f, 0.1f);
sphere_->addToRenderer(_renderer, _baseRO, sphereRadius);
// X-Axis
_baseRO->debugName = "coordsys.x.axis";
_baseRO->emissive = Vec3f(1.0f, 0.0f, 0.0f);
_baseRO->emissive = Vec3f(0.5f, 0.0f, 0.0f);
_baseRO->diffuse = Vec3f(0.3f, 0.0f, 0.0f);
_baseRO->specular = Vec3f(0.1f, 0.0f, 0.0f);
_baseRO->ambient = Vec3f(0.1f, 0.0f, 0.0f);
_baseRO->modelview = mModelView;
_baseRO->modelview.rotate (-90, 0, 1, 0);
_baseRO->modelview.translate ( 0, 0, -bodyLength );
......@@ -218,7 +224,10 @@ void CoordsysNode::drawCoordsys(IRenderer* _renderer, RenderObject* _baseRO)
// Y-Axis
_baseRO->debugName = "coordsys.y.axis";
_baseRO->emissive = Vec3f(0.0f, 1.0f, 0.0f);
_baseRO->emissive = Vec3f(0.0f, 0.5f, 0.0f);
_baseRO->diffuse = Vec3f(0.0f, 0.3f, 0.0f);
_baseRO->specular = Vec3f(0.0f, 0.1f, 0.0f);
_baseRO->ambient = Vec3f(0.0f, 0.1f, 0.0f);
_baseRO->modelview = mModelView;
_baseRO->modelview.rotate (90, 1, 0, 0);
_baseRO->modelview.translate ( 0, 0, -bodyLength );
......@@ -231,7 +240,10 @@ void CoordsysNode::drawCoordsys(IRenderer* _renderer, RenderObject* _baseRO)
// Z-Axis
_baseRO->debugName = "coordsys.z.axis";
_baseRO->emissive = Vec3f(0.0f, 0.0f, 1.0f);
_baseRO->emissive = Vec3f(0.0f, 0.0f, 0.5f);
_baseRO->diffuse = Vec3f(0.0f, 0.0f, 0.3f);
_baseRO->specular = Vec3f(0.0f, 0.0f, 0.1f);
_baseRO->ambient = Vec3f(0.0f, 0.0f, 0.1f);
_baseRO->modelview = mModelView;
_baseRO->modelview.rotate (180, 0, 1, 0);
_baseRO->modelview.translate ( 0, 0, -bodyLength );
......@@ -504,7 +516,7 @@ void CoordsysNode::getRenderObjects( IRenderer* _renderer, GLState& _state, cons
ro.modelview = _state.modelview();
// colored by emission only
ro.shaderDesc.shadeMode = SG_SHADE_UNLIT;
ro.shaderDesc.shadeMode = SG_SHADE_PHONG;
ro.shaderDesc.clearTextures();
ro.shaderDesc.vertexColors = false;
......
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