Further work on new VertexBufferObject/ElementsBufferObject support

This commit is contained in:
Robert Osfield
2007-04-29 08:12:29 +00:00
parent 47598ce1a9
commit 921eb0fdd0
6 changed files with 299 additions and 61 deletions

View File

@@ -244,6 +244,8 @@ class OSG_EXPORT VertexBufferObject : public BufferObject
Array* getArray(unsigned int i) { return _bufferEntryArrayPairs[i].second; }
const Array* getArray(unsigned int i) const { return _bufferEntryArrayPairs[i].second; }
const GLvoid* getOffset(unsigned int i) const { return (const GLvoid*)(_bufferEntryArrayPairs[i].first.offset); }
virtual bool needsCompile(unsigned int contextID) const;
virtual void compileBuffer(State& state) const;
@@ -276,6 +278,8 @@ class OSG_EXPORT ElementsBufferObject : public BufferObject
DrawElements* getDrawElements(unsigned int i) { return _bufferEntryDrawElementsPairs[i].second; }
const DrawElements* getDrawElements(unsigned int i) const { return _bufferEntryDrawElementsPairs[i].second; }
const GLvoid* getOffset(unsigned int i) const { return (const GLvoid*)(_bufferEntryDrawElementsPairs[i].first.offset); }
virtual bool needsCompile(unsigned int contextID) const;
virtual void compileBuffer(State& state) const;