Added osg::Geometry::verifyArray(std::ostream&) method to enable checks to be done on osg::Geometry to see if the arrays

are big enough to handle the primitives used in the geometry.

Added usage of verifyArray into osgfilecache so that it reports any problems on reading files in paged database.
This commit is contained in:
Robert Osfield
2011-01-03 19:41:06 +00:00
parent 25ef1a9e58
commit d644a6dfe3
3 changed files with 302 additions and 6 deletions

View File

@@ -327,6 +327,7 @@ class OSG_EXPORT Geometry : public Drawable
/** Get whether fast paths should be used when supported. */
bool getFastPathHint() const { return _fastPathHint; }
/** Return true if OpenGL fast paths will be used with drawing this Geometry.
* Fast paths directly use vertex arrays, and glDrawArrays/glDrawElements so have low CPU overhead.
* With Slow paths the osg::Geometry::drawImplementation has to dynamically assemble OpenGL
@@ -348,6 +349,8 @@ class OSG_EXPORT Geometry : public Drawable
void computeCorrectBindingsAndArraySizes();
/** check whether the arrays, indices, bindings and primitives all match correctly, return false is .*/
bool verifyArrays(std::ostream& out) const;
bool suitableForOptimization() const;