Further work on the new VBO support

This commit is contained in:
Robert Osfield
2007-04-27 14:52:30 +00:00
parent 2168eac1d4
commit 4968eb7136
11 changed files with 570 additions and 56 deletions

View File

@@ -171,6 +171,8 @@ public:
virtual void end() = 0;
};
class DrawElements;
class OSG_EXPORT PrimitiveSet : public Object
{
public:
@@ -220,6 +222,9 @@ class OSG_EXPORT PrimitiveSet : public Object
virtual const GLvoid* getDataPointer() const { return 0; }
virtual unsigned int getTotalDataSize() const { return 0; }
virtual bool supportsBufferObject() const { return false; }
virtual DrawElements* getDrawElements() { return 0; }
virtual const DrawElements* getDrawElements() const { return 0; }
void setMode(GLenum mode) { _mode = mode; }
GLenum getMode() const { return _mode; }
@@ -415,6 +420,9 @@ class DrawElements : public PrimitiveSet
_eboIndex(0) {}
virtual DrawElements* getDrawElements() { return this; }
virtual const DrawElements* getDrawElements() const { return this; }
/** Set the ElementsBufferObject.*/
inline void setElementsBufferObject(osg::ElementsBufferObject* ebo)
{