Changeset 13041 for OpenSceneGraph/trunk/src/osg/BufferObject.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/BufferObject.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/BufferObject.cpp
r12912 r13041 207 207 const osg::Image* image = entry.dataSource->asImage(); 208 208 if (image && !(image->isDataContiguous())) 209 { 209 { 210 210 unsigned int offset = entry.offset; 211 211 for(osg::Image::DataIterator img_itr(image); img_itr.valid(); ++img_itr) … … 217 217 } 218 218 else 219 { 219 { 220 220 _extensions->glBufferSubData(_profile._target, (GLintptrARB)entry.offset, (GLsizeiptrARB)entry.dataSize, entry.dataSource->getDataPointer()); 221 221 } … … 666 666 return; 667 667 } 668 668 669 669 // if nothing to delete return 670 670 if (_orphanedGLBufferObjects.empty()) return; … … 1599 1599 void PixelDataBufferObject::compileBuffer(State& state) const 1600 1600 { 1601 unsigned int contextID = state.getContextID(); 1601 unsigned int contextID = state.getContextID(); 1602 1602 if ( _profile._size == 0) return; 1603 1603 … … 1613 1613 void PixelDataBufferObject::bindBufferInReadMode(State& state) 1614 1614 { 1615 unsigned int contextID = state.getContextID(); 1615 unsigned int contextID = state.getContextID(); 1616 1616 1617 1617 GLBufferObject* bo = getOrCreateGLBufferObject(contextID); … … 1628 1628 void PixelDataBufferObject::bindBufferInWriteMode(State& state) 1629 1629 { 1630 unsigned int contextID = state.getContextID(); 1630 unsigned int contextID = state.getContextID(); 1631 1631 1632 1632 GLBufferObject* bo = getOrCreateGLBufferObject(contextID); … … 1642 1642 //-------------------------------------------------------------------------------- 1643 1643 void PixelDataBufferObject::unbindBuffer(unsigned int contextID) const 1644 { 1644 { 1645 1645 GLBufferObject::Extensions* extensions = GLBufferObject::getExtensions(contextID,true); 1646 1646
