Added s/getFastPathHint().

This commit is contained in:
Robert Osfield
2003-08-09 00:46:48 +00:00
parent d6820a3f2b
commit ef4535a2a4
2 changed files with 116 additions and 10 deletions

View File

@@ -248,11 +248,17 @@ class SG_EXPORT Geometry : public Drawable
unsigned int getPrimitiveSetIndex(const PrimitiveSet* primitiveset) const;
/** Set whether fast paths should be used when supported.*/
void setFastPathHint(bool on) { _fastPathHint = on; }
/** 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 use vertex arrays, and glDrawArrays/glDrawElements. Slow paths
* use glBegin()/glVertex.../glEnd(). Use of per primitive bindings or per vertex indexed
* arrays will drop the rendering path off the fast path.*/
inline bool areFastPathsUsed() const { return _fastPath; }
inline bool areFastPathsUsed() const { return _fastPath && _fastPathHint; }
bool computeFastPathsUsed();
@@ -344,6 +350,8 @@ class SG_EXPORT Geometry : public Drawable
mutable bool _fastPath;
bool _fastPathHint;
ref_ptr<Geometry> _internalOptimizedGeometry;
};