[vtkusers] Backface wireframe color not visible under Mac OS X
Arnaud BARRE
arnaud.barre at gmail.com
Sun Sep 23 16:55:59 EDT 2012
I'm still investigating this issue.
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.
I tested the code using a QWidget and QWidget2 instance, but in both case I
don't see the backface color.
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 ?
On Thu, Aug 2, 2012 at 11:07 PM, Arnaud BARRE <arnaud.barre at gmail.com>wrote:
> 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.
>
> 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.
>
> 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.
>
> Thank you very much.
>
> // The following line contain the vtkPlaneSource
> btk::VTKGroundSource* ground = btk::VTKGroundSource::New();
> vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();
> mapper->SetInput(ground->GetOutput());
> vtkProperty* prop = vtkProperty::New();
> prop->SetRepresentation(VTK_WIREFRAME);
> prop->SetColor(0.8, 0.8, 0.8);
> prop->SetAmbient(0.5);
> prop->SetDiffuse(0.0);
> prop->SetSpecular(0.0);
> vtkActor* actor = vtkActor::New();
> actor->SetMapper(mapper);
> actor->SetProperty(prop);
> vtkProperty* propBackface = vtkProperty::New();
> propBackface->DeepCopy(prop);
> propBackface->SetColor(1.0, 0.0, 0.0);
> actor->SetBackfaceProperty(propBackface);
> renderer->AddViewProp(actor);
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120923/4e8a1379/attachment.htm>
More information about the vtkusers
mailing list