I was interested in drawing less than all of the data in DrawElements as I
stated in this mailing list thread:
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2013-July/063950.html

Looking at DrawElements* in PrimitiveSet.cpp, they seem to be hardwired to
draw all the data. I added a _count variable like in DrawArrays to let the
user draw only a subset of the data. I also added a _countDefined flag to
be set when the user actually defines a count. If it's not set, the old
behavior of drawing all the data is used. I'm not sure if this is the best
solution, but I don't see another way to do it without changing the API
because, unlike DrawArrays, DrawElements can be initialized with no count
specified.

However it ends up being implemented, this seems like good functionality to
have. Not allowing a count to be specified removes access to an OpenGL
feature that should be exposed.
--
Terry Welsh
www.reallyslick.com

Attachment: PrimitiveSet.tar.gz
Description: GNU Zip compressed data

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

Reply via email to