Added Geometry::drawVertexArraysomplemetation(..) and drawPrimitivesImplemenation(..) methods that are called from drawImplementation(..). These new vertex methods

allow subclasses from osg::Geometry to specialize the vertex array setup or how the primitives are dispatched to OpenGL.
This commit is contained in:
Robert Osfield
2013-11-21 10:31:34 +00:00
parent dbf88cc209
commit a54b999ccc
2 changed files with 35 additions and 15 deletions

View File

@@ -173,7 +173,13 @@ class OSG_EXPORT Geometry : public Drawable
*/
virtual void drawImplementation(RenderInfo& renderInfo) const;
/** Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&). */
/** Set up the vertex arrays for the purpose of rendering, called by drawImplemtation() prior to it calling drawPrimitivesImplementation().*/
void drawVertexArraysImplementation(RenderInfo& renderInfo) const;
/** dispatch the primitives to OpenGL, called by drawImplemtation() after calling drawVertexArraysImplementation().*/
void drawPrimitivesImplementation(RenderInfo& renderInfo) const;
/** Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&). */
virtual bool supports(const Drawable::AttributeFunctor&) const { return true; }
/** Accept an Drawable::AttributeFunctor and call its methods to tell it about the internal attributes that this Drawable has. */