On Thu, Apr 5, 2012 at 6:53 PM, Stefan Radomski <[email protected]> wrote:

> 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


Alpha shouldn't be required, IMO, but maybe I am wrong on this one.

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.
>

This seems odd. Normally the binding flag should override it, but it is
probably better to do as you did and not specify the array unless it is
required. On the other hand, according to the code in Geometry.cpp (line
573), using BIND_PER_PRIMITIVE or specifying indices drops you off the fast
path, so you may want to reconsider how you are exporting your geometry.

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.
>

Regarding your patch, you may want to submit that to osg-submissions list
so that it gets included in the official code.

Best,

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

Reply via email to