Commit 591df8d4 authored by Matthias Möller's avatar Matthias Möller
Browse files

fix colors for the shader pipeline

refs #1758

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17722 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3909622b
......@@ -408,9 +408,7 @@ void SkeletonNodeT<SkeletonType>::draw(GLState& _state, const DrawModes::DrawMod
|| (_drawMode & DrawModes::SOLID_FACES_COLORED)
|| (_drawMode & DrawModes::SOLID_FACES_COLORED_FLAT_SHADED) )
{
Vec4f baseColor = _state.ambient_color();
if ( (_drawMode & DrawModes::SOLID_FLAT_SHADED)
|| (_drawMode & DrawModes::SOLID_FACES_COLORED_FLAT_SHADED) ){
......@@ -437,6 +435,7 @@ void SkeletonNodeT<SkeletonType>::draw(GLState& _state, const DrawModes::DrawMod
continue;
//select joint color
Vec4f baseColor = _state.ambient_color();
glColor4fv( &baseColor[0] );
Vec3d parentPos = pose->globalTranslation(parent->id());
......@@ -841,6 +840,8 @@ void SkeletonNodeT<SkeletonType>::getRenderObjects(IRenderer* _renderer,
ro.setupShaderGenFromDrawmode(props);
ro.setMaterial(_mat);
ACG::Vec4f baseColor = _state.ambient_color();
ro.emissive = ACG::Vec3f(baseColor[0],baseColor[1],baseColor[2]);
// draw the bones
for(it = skeleton_.begin(); it != skeleton_.end(); ++it) {
......
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