Implement deleteAllTextureObject/BufferObjects functionality.

Cleaned up warnings.
This commit is contained in:
Robert Osfield
2009-11-27 11:43:18 +00:00
parent ab8d93a181
commit 6ebeff658a
3 changed files with 101 additions and 98 deletions

View File

@@ -208,7 +208,7 @@ class OSG_EXPORT GLBufferObject : public Referenced
inline GLuint getGLObjectID() const { return _glObjectID; }
inline GLsizeiptrARB getOffset(unsigned int i) const { return _bufferEntries[i].offset; }
void bindBuffer();
inline void bindBuffer();
inline void unbindBuffer()
{
@@ -231,13 +231,6 @@ class OSG_EXPORT GLBufferObject : public Referenced
static GLBufferObject* createGLBufferObject(unsigned int contextID, const BufferObject* bufferObject);
/** Use deleteVertexBufferObject instead of glDeleteBuffers to allow
* OpenGL buffer objects to be cached until they can be deleted
* by the OpenGL context in which they were created, specified
* by contextID.*/
static void deleteBufferObject(unsigned int contextID,GLuint globj);
static void deleteAllBufferObjects(unsigned int contextID);
static void discardAllBufferObjects(unsigned int contextID);
static void flushAllDeletedBufferObjects(unsigned int contextID);
@@ -734,6 +727,11 @@ class OSG_EXPORT PixelDataBufferObject : public BufferObject
};
inline void GLBufferObject::bindBuffer()
{
_extensions->glBindBuffer(_profile._target,_glObjectID);
if (_set) _set->moveToBack(this);
}
}