On Wed, Nov 24, 2010 at 4:02 PM, Werner Modenbach < [email protected]> wrote:
> Am Mittwoch, 24. November 2010, 15:31:48 schrieb Tim Moore: > > On Wed, Nov 24, 2010 at 2:52 PM, Werner Modenbach < > > > > > > > You can calculate the binormal from the normal and tangent vector in a > > shader, for some savings. > OK, I'll think about it. > > > > > Each yarn ist defined by a polygon along its center with about 800 > > > nodes. > > > > > > On each node I have an irregularly formed ring of about 10 nodes > defining > > > the form of the surface. This is necessary because of benting and > stretch > > > deformation. > > > > > > So per ring I need about 20 triangles having 60 vertices. > > > > I'm not completely clear whether you are building a mesh or not, but if > you > > are, you need 20 distinct vertices to build the ring. If adjacent rings > > share vertices, then you need only approx 800 * 10 = 8000 vertices for > one > > strand of yarn. You can build the mesh with indexes and the DrawElement > > primitive set type. > I was told using indexes is leaving fast path rendering. Isn't that the > case? > Absolutely not. DrawElements is heavily optimized on current graphics cards. In your case you might want to split the geometry into two drawables to keep the indices under 65k, but even that is less necessary these days. The slow path indexed mode is something different. That allows a different index for each vertex attribute. DrawElements uses one index per vertex. > I would be very, very lucky!!! > I hope so :) Tim > > - Werner - > _______________________________________________ > 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

