Hello Jan,

I am sorry, seems like I played around with the file too much before submitting 
- "colorPerVertex" is supposed to be set to false.

I have had mixed results with different svn tags and am still trying to narrow 
it down. I can say that the problem never occurs if the attached patch is 
applied, wherein I substitute the color array's osg::Vec3 by a osg::Vec4 with 
an explicit alpha value of 1.0 and do not set the color indices to the vertex 
indices if no explicit color indices are given. If either of these changes is 
omitted, I get color bindings as if they were set per vertex. At the moment I 
am trying with the 3.1.1 svn tag.

Do these changes suggest any problem at another part of osg or even my system 
to anyone? I tried with Debian 6.0.4 stable (Mesa OpenGL implementation) and 
MacOSX 10.7.3 on a MacBook Pro. I will try to compile osg 3.1.1 with a "fresh" 
debian installation during the weekend and report back.

Best regards
Stefan

Attachment: IndexedFaceSet.cpp.patch
Description: Binary data


On 5 Apr, 2012, at 6:32 PM, Jan Ciger wrote:

> Hi,
> 
> On Tue, Mar 27, 2012 at 10:14 AM, Stefan Radomski <[email protected]> wrote:
> Hi,
> 
> it seems that there is a bug in the vrml plugin or possible the color binding 
> handling of osg. When colorPerVertex is set to false, the scene nevertheless 
> appears as if colors were bound per vertex. Though I verified that 
> BIND_PER_PRIMITIVE is used for color binding in IndexedFaceSet.cpp:220.
> 
> I attached a minimal example with two cubes, a blue one behind a green one. 
> FreeWRL will render this correctly, osgviewer renders it as if colorPerVertex 
> was set to TRUE.
> 
> From what I can see, the file *does* have colorPerVertex set to TRUE. 
> 
> Jan
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to