Experimental support for OpenGL Vertex Array Object
This commit is contained in:
@@ -176,11 +176,17 @@ class OSG_EXPORT Geometry : public Drawable
|
||||
*/
|
||||
virtual void drawImplementation(RenderInfo& renderInfo) const;
|
||||
|
||||
|
||||
/** Set up the vertex arrays for the purpose of rendering, called by drawImplemtation() prior to it calling drawPrimitivesImplementation().*/
|
||||
void drawVertexArraysImplementation(RenderInfo& renderInfo) const;
|
||||
void old_drawVertexArraysImplementation(RenderInfo& renderInfo) const;
|
||||
|
||||
/** dispatch the primitives to OpenGL, called by drawImplemtation() after calling drawVertexArraysImplementation().*/
|
||||
void drawPrimitivesImplementation(RenderInfo& renderInfo) const;
|
||||
void old_drawPrimitivesImplementation(RenderInfo& renderInfo) const;
|
||||
|
||||
|
||||
/** Set up the vertex arrays for the purpose of rendering, called by drawImplemtation() prior to it calling drawPrimitivesImplementation().*/
|
||||
void new_drawImplementation(RenderInfo& renderInfo) const;
|
||||
|
||||
|
||||
/** Return true, osg::Geometry does support accept(Drawable::AttributeFunctor&). */
|
||||
virtual bool supports(const Drawable::AttributeFunctor&) const { return true; }
|
||||
@@ -217,6 +223,9 @@ class OSG_EXPORT Geometry : public Drawable
|
||||
void addVertexBufferObjectIfRequired(osg::Array* array);
|
||||
void addElementBufferObjectIfRequired(osg::PrimitiveSet* primitiveSet);
|
||||
|
||||
typedef buffered_object< osg::ref_ptr<VertexArrayState> > VertexArrayStateList;
|
||||
mutable VertexArrayStateList _vertexArrayStateList;
|
||||
|
||||
|
||||
PrimitiveSetList _primitives;
|
||||
osg::ref_ptr<Array> _vertexArray;
|
||||
|
||||
Reference in New Issue
Block a user