Show
Ignore:
Timestamp:
10/03/09 11:25:23 (4 years ago)
Author:
robert
Message:

Introduced new GLBufferObject pool for managing the memory footprint taken up by VertexBufferObejct?, ElementBufferObject? and PixelBufferObject?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/State

    r10600 r10601  
    412412            if (vbo == _currentVBO) return; 
    413413            if (vbo->isDirty()) vbo->compileBuffer(); 
    414             else _glBindBuffer(GL_ARRAY_BUFFER_ARB,vbo->getGLObjectID()); 
     414            else vbo->bindBuffer(); 
    415415            _currentVBO = vbo; 
    416416        } 
     
    430430            if (ebo == _currentEBO) return; 
    431431            if (ebo->isDirty()) ebo->compileBuffer(); 
    432             else _glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,ebo->getGLObjectID()); 
     432            else ebo->bindBuffer(); 
    433433            _currentEBO = ebo; 
    434434        } 
     
    449449 
    450450            if (pbo->isDirty()) pbo->compileBuffer(); 
    451             else _glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB,pbo->getGLObjectID()); 
     451            else pbo->bindBuffer(); 
    452452 
    453453            _currentPBO = pbo; 
     
    10411041        unsigned int getMaxTexturePoolSize() const { return _maxTexturePoolSize; } 
    10421042 
    1043         void setMaxVBOPoolSize(unsigned int size); 
    1044         unsigned int getMaxVBOPoolSize() const { return _maxVBOPoolSize; } 
    1045  
    1046         void setMaxFBOPoolSize(unsigned int size); 
    1047         unsigned int getMaxFBOPoolSize() const { return _maxFBOPoolSize; } 
    1048  
     1043        void setMaxBufferObjectPoolSize(unsigned int size); 
     1044        unsigned int getMaxBufferObjectPoolSize() const { return _maxBufferObjectPoolSize; } 
    10491045 
    10501046 
     
    12341230 
    12351231        unsigned int                                                    _maxTexturePoolSize; 
    1236         unsigned int                                                    _maxVBOPoolSize; 
    1237         unsigned int                                                    _maxFBOPoolSize; 
     1232        unsigned int                                                    _maxBufferObjectPoolSize; 
    12381233 
    12391234