Hi Alex,

It's hard to guess from the information what is going wrong.  It could
be z-fighting or some render order issue with overlapping triangles.
It could also possibly be state like normals and colours being
inherited from one geometry, this can happen when some geometry are
left without a colour or normal array but the OpenGL set up relies on
these so you end up inheriting whatever state was set previously.  The
only other possibility that might be a miss is setting
GL_COLOR_MATERIAL mode as osg::Material internally sets this for you
so you shouldn't set it yourself.

Robert.

On 1 May 2012 01:40, Pecoraro, Alexander N
<[email protected]> wrote:
> I’m trying to draw some translucent colored triangles on top of some
> textured triangles and the triangle color does not appear to be working
> consistently. I’m setting the osg::Geometry color array and its binding to
> BIND_PER_PRIMITIVE_SET and adding one color to the array per primitive set.
> However, what I’m seeing is that the triangles just look black - they are
> transparent though - so the color arrays transparency seems to be having an
> effect, but the color does not. However, if I rotate the camera around a
> little and position it just right then the color starts taking effect, which
> makes me think that some other branch of scene graph is setting some state
> that is preventing the color array from being used correctly. Can anyone
> provide me some hints as to what to look for? Here’s the states that I am
> setting on the colored geometry:
>
>
>
> GL_COLOR_MATERIAL - OFF | PROTECTED
>
> GL_CULL_MODE - OFF | PROTECTED
>
> GL_LIGHTING - OFF | PROTECTED
>
> GL_BLEND - ON | PROTECTED
>
>
>
> I’m kind of stumped as to what I’m doing wrong, so any help would be
> appreciated.
>
>
>
> Thanks.
>
>
>
> Alex
>
>
> _______________________________________________
> 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