On Tue, Jun 2, 2009 at 1:27 PM, Maxime BOUCHER <m.boucher...@gmail.com> wrote:
> 1) The BIG one:
>  What is the max number of primitives I can put in a single PrimitiveSet in 
> order to get an efficient rendering?

That depends upon your hardware/drivers.

Ten's of thousands of primitives per PrimitiveSet is something I'd
usually use a reasonable upper limit.

You really do have to try things out with your target hardware though.

> 2)Really less important:
>  I created a geode to which I added a geometry.
> To this geometry I added:
> -A primitiveSet type DrawArrayLengths, mode TRIANGLES
> -A colorArray Vec4ubArray, set the color binding
> -A VertexIndices array
> -A VertexArray
>
> I fill the VertexArray, and the VertexIndices then set the first value of the 
> DrawArrayLengths as the size of the VertexIndices.
>
> I thought I add filled all the necessary elements to get a geode I can 
> render, but when I add it to my root and run the viewer, it doesn't display.
>  Do you see something I forgot?


Please don't use VertexIndices they are deprecated and force the OSG
to rendering with slow paths.

FAR FAR FAR better is to ditch the DrawArrayLenghts and use of
VertexIndices and use DrawElements* instead as it'll unsure the the
OSG and OpenGL consistently use efficient rendering paths.

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

Reply via email to