On Jan 7, 2008 10:28 AM, Thibault Genessay <[EMAIL PROTECTED]> wrote:
> > So if you want fast paths absolutely never ever ever used vertex
> > indices.   Vertex indices are there in the OSG purely for backwards
> > compatibility and are not something I'd recommend usage today.
>
> Acknowledged. Now, what is the preferred way to render triangle
> strip-based geometries where all strips are parallel and share an edge
> ? Should we duplicate all common vertices ? e.g. I have a 1080 * 31
> patch, rendered as 30 tri strips (basically, it's a 3D plot). I use
> indexed rendering so I have 33480 vertices. Now if I want to switch to
> "fast-path", does it mean I'm going to need 2*1080*30 = 64800 vertices
> ?
> Given the amount of info for each vertex (color, texcoords, ...) this
> seems a pretty big memory impact to me (and if the T&L has to be
> performed again, it can also be a slowdown, can't it ?). I am no
> cutting-edge 3D expert so please forgive my ignorance.

If all the shared vertices share all other vertex attributes (i.e.
color, normals, tex coords etc) then you should use
osg::DrawElementUShort primitive sets and standard vertex arrays.

If your tex coords, normals etc aren't shared across the common edges
then you have to fallback to duplicating the vertices or use vertex
indices.  Duplicating the vertices to maintain fast paths will usually
be the best way to get performance.  If... performance isn't an issue,
and convenience is then use of vertex indices might be considered,
especially if you are using display lists as a good OpenGL driver can
then make best of bad job when it comes to slow paths.

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

Reply via email to