I'm still investigating this issue.<br><br>I tested on a non developer machine under MacOS 10.6.8, and I have the same problem. The backface color is not visible when using a wireframe representation. So it seems to be a MacOS issue as I have not this problem under Windows.<br>
<br>I tested the code using a QWidget and QWidget2 instance, but in both case I don't see the backface color.<br><br>How could I try to fix this issue? Do you think this problem can be in the code of the class vtkCocoaRenderWindow? Or can it be a problem in the implementation of OpenGL under MacOS ?<br>
<br><div class="gmail_quote">On Thu, Aug 2, 2012 at 11:07 PM, Arnaud BARRE <span dir="ltr"><<a href="mailto:arnaud.barre@gmail.com" target="_blank">arnaud.barre@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a vtkPlaneSource (set with a 20x20 resolution to represent the ground) set to a wireframe representation with a color for the front and the back face as presented in code at the end of this mail. I have no problem to see both colors under Windows 7 64-bit with VTK 5.6.1, but the same code doesn't work under MacOS X 10.5 with VTK 5.6.1 and VTK 5.10. <br>
<br>Under Mac, if I enable the front face culling, then I can see the back face color. If I use the surface representation, then there is no problem and I can see both colors.<br><br>Do you know if this problem is related to Mac OS X or maybe only to the 10.5 version? I didn't find any post related to this problem.<br>
<br>Thank you very much.<br><br><span style="font-family:courier new,monospace">// The following line contain the vtkPlaneSource</span><br><span style="font-family:courier new,monospace">btk::VTKGroundSource* ground = btk::VTKGroundSource::New();<br>
vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();<br>mapper->SetInput(ground->GetOutput());<br>vtkProperty* prop = vtkProperty::New();<br>prop->SetRepresentation(VTK_WIREFRAME);<br>prop->SetColor(0.8, 0.8, 0.8);<br>
prop->SetAmbient(0.5);<br>prop->SetDiffuse(0.0);<br>prop->SetSpecular(0.0);<br>vtkActor* actor = vtkActor::New();<br>actor->SetMapper(mapper);<br>actor->SetProperty(prop);<br>vtkProperty* propBackface = vtkProperty::New();<br>
propBackface->DeepCopy(prop);<br>propBackface->SetColor(1.0, 0.0, 0.0);<br>actor->SetBackfaceProperty(propBackface);<br>renderer->AddViewProp(actor);</span><br>
</blockquote></div><br>