hi bryan, thank you for your reply.
> > > > > > according to documentation: "Fast paths use vertex arrays, and > > glDrawArrays/glDrawElements." > > > > Which documentation? > - sorry, i meant "according to (doxygen) reference" (http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00267.html#fe139bb2f71cbafc1a8fc9e707ca5397) > > > > - what is the difference between vertex arrays and glDrawArrays, or is > > it meant as generic term for glDrawArrays/glDrawElements? > > > > Usually "vertex arrays" means using glVertexPointer() instead of a > series of glVertexf(). > - solved > > > > > > will the use of something like this drop me into slow path mode? > > > > Code: > > > > osg::TemplateIndexArray |unsigned int, osg::Array::UIntArrayType,4,4| > > *colorIndexArray; > > colorIndexArray = new osg::TemplateIndexArray |unsigned int, > > osg::Array::UIntArrayType,4,4|; > > colorIndexArray->push_back(0); > > > > Using index arrays will drop you into slow path mode, as will binding > any of your data arrays PER_PRIMITIVE. See > osg::Geometry::drawImplementation() for the exact conditions. > - as far as i have understood "osg::Geometry::drawImplementation()": regardless of what a indexed array is indexing (vertex, color, normals, etc.) it will drop me into slow path mode. but does type glDrawElements also falls under this rule - they are indexed too? but according to reference: "Fast paths use vertex arrays, and DrawArrays/glDrawElements." - whats the difference between BIND_PER_PRIMITIVE_SET and BIND_PER_PRIMITIVE? in the tutorials these types are never used, but i assume if i have a geometry consisting of 4 quads, i could define a colorarray with 4 entries and bind them with BIND_PER_PRIMITIVE_SET, so the vertices of quad_1 get color_1, quad_2's vertices color_2, and so on, meaning every quad gets its own color. > > > > > > if not, i'm looking for a way to assign normals to vertices per > > indexed array, like the colorindexarray above. does this work in the same > > way? > > > > Code: > > > > osg::TemplateIndexArray |unsigned int, osg::Array::UIntArrayType,3,4| > > *normalsIndexArray; > > normalsIndexArray = new osg::TemplateIndexArray|unsigned int, > > osg::Array::UIntArrayType,3,4|; > > normalsIndexArray->push_back(0); > > > > It's most likely faster (because you'll be avoiding the slow path) to > copy your vertices and normals so you can bind the normals PER_VERTEX, > even though you'll get duplicates in the array. There was a thread on > the mailing list about how to do this recently; I suggest you search the > archives for it. > - solved ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12033#12033 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org