SetVertexColor different results

Hello!

I got different result using SetVertexColor on an Graphic3d_ArrayOfPrimitives elements, as you can see from the pictures attached.
myPArray->SetVertexColor(index, 0, 0, 1); // ok!
myPArray->SetVertexColor(index, Quantity_NOC_BLUE); // the array elements are displayed in other color than blue!
The same problem occurs with any other color!
It this normal?

These are the only settings for displaying the array:
Handle(Prs3d_ShadingAspect) shasp = new Prs3d_ShadingAspect();
// without this setting even the first solution failed and displays other color than blue similar with the second one!
shasp->Aspect()->SetShadingModel(Graphic3d_TypeOfShadingModel::Graphic3d_TOSM_UNLIT);
myDrawer->SetShadingAspect(shasp);
myDrawer->SetFaceBoundaryDraw(true);

gkv311 n's picture

Be careful with SetVertexColor() overloads - there is the one that takes int on input. I guess your code passing enumeration goes into this hole. Try passing Quantity_Color explicitly.

bioan m's picture

Just excellent!!!
Passing Quantity_Color explicitly do the trick!!!
Thank you very much!!!