vtkOpenGLGlyph3DMapper (OpenGL2 version in VTK 6.3) does not take into account the colour from the actor's property
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If colouring by scalars is not enabled, the glyphs are always plain white. Here is a solution:
At the start of RebuildStructures, insert:
unsigned char colour[3]; { const double *actorColour = actor->GetProperty()->GetColor(); for (int i = 0; i != 3; ++i) { colour[i] = static_cast(actorColour[i] * 255.0 + 0.5); } }
then replace
entry->Colors[entry->NumberOfPoints*4] = 255;
entry->Colors[entry->NumberOfPoints*4+1] = 255;
entry->Colors[entry->NumberOfPoints*4+2] = 255;
by
entry->Colors[entry->NumberOfPoints*4] = colour[0];
entry->Colors[entry->NumberOfPoints*4+1] = colour[1];
entry->Colors[entry->NumberOfPoints*4+2] = colour[2];