You need to add a StateSet to your geometry to activate openGL blending

2007/8/29, Nicholas Yue <[EMAIL PROTECTED]>:
> Hi,
>
>   I tried to modify and existing sample tet6.osg so that the 4th color
> component is lesser than 1.0.
>
>   I was expecting to see some transparency in the tetrahedron but the color
> looks solid.
>
> Regards
Geode {
  UniqueID Geode_0
  DataVariance DYNAMIC
  nodeMask 0xffffffff
  cullingActive TRUE
  num_drawables 1
  Geometry {
    DataVariance DYNAMIC
    useDisplayList TRUE
    useVertexBufferObjects FALSE
    StateSet {
          GL_BLEND ON
        }
    PrimitiveSets 1
    {
      DrawElementsUInt TRIANGLES 12
      {
        0 1 2 3 4 5 6 7 8 9
        10 11
      }
    }
    VertexArray Vec3Array 12
    {
      1 0 0
      0 1 0
      0 0 1
      0 0 0
      0 0 1
      0 1 0
      0 0 0
      1 0 0
      0 0 1
      0 0 0
      0 1 0
      1 0 0
    }
    NormalBinding PER_VERTEX
    NormalArray Vec3Array 4
    {
      0.57735 0.57735 0.57735
      -1 0 0
      0 -1 0
      0 0 -1
    }
    NormalIndices UIntArray 12     {
      0 0 0 1 1 1 2 2 2 3
      3 3
    }
    ColorBinding PER_VERTEX
    ColorArray Vec4Array 4
    {
      1 1 1 0.1
      1 0 0 0.1
      0 1 0 0.1
      0 0 1 0.1
    }
    ColorIndices UIntArray 12     {
      0 0 0 1 1 1 2 2 2 3
      3 3
    }
  }
}



-- 
Mathieu
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to