Triedron always black when V3d_ZBUFFER

I can't display the axes colors on a static triedron created with the call V3d_View->TriedronDisplay. I have tried to enable/disable GL Lighting, change colors in ZBufferTriedronSetup, change the ShadingModel but no success.

Can anyone tell me how can I enable the lighting or the flat color shading for a static triedron to show the axes colors?

Thanks in advance.
Marc.

m.costa's picture

Hi all,

This old thread http://www.opencascade.org/org/forum/thread_18854/, doesn't take into account any V3d_View status before calling TriedronDisplay. I've been calling display functions, texture functions, lighting functions, etc on my V3d_View but no success on showing static Triedron axes' colors. I've added a V3d_AmbientLight to the scene, which lights the objects displayed but not the triedron.

I am using OpenCASCADE 6.5.1. Any idea of what can I be doing wrong? Or is it a possible OCC bug?

Any help would be appreciated.
Marc.

m.costa's picture

Hi there,

I've finally managed to show the colors: calling V3d_Viewer::SetDefaultLights did the trick.

But there's still something that worries me: The lights affect the entire scene and all of their objects. What if I don't want to use the default lights? How can I set a light that illuminated the Triedron?