Added temporary code (but comment out) for testing VBO performance
This commit is contained in:
parent
aa56bddefc
commit
9e07a72119
@ -258,6 +258,7 @@ Drawable::Drawable()
|
||||
|
||||
_supportsVertexBufferObjects = false;
|
||||
_useVertexBufferObjects = false;
|
||||
// _useVertexBufferObjects = true;
|
||||
|
||||
_numChildrenRequiringUpdateTraversal = 0;
|
||||
_numChildrenRequiringEventTraversal = 0;
|
||||
@ -603,6 +604,8 @@ void Drawable::setUseDisplayList(bool flag)
|
||||
|
||||
void Drawable::setUseVertexBufferObjects(bool flag)
|
||||
{
|
||||
// _useVertexBufferObjects = true;
|
||||
|
||||
// osg::notify(osg::NOTICE)<<"Drawable::setUseVertexBufferObjects("<<flag<<")"<<std::endl;
|
||||
|
||||
// if value unchanged simply return.
|
||||
|
@ -1135,6 +1135,8 @@ osg::ElementsBufferObject* Geometry::getOrCreateElementsBufferObject()
|
||||
|
||||
void Geometry::setUseVertexBufferObjects(bool flag)
|
||||
{
|
||||
// flag = true;
|
||||
|
||||
// osg::notify(osg::NOTICE)<<"Geometry::setUseVertexBufferObjects("<<flag<<")"<<std::endl;
|
||||
|
||||
if (_useVertexBufferObjects==flag) return;
|
||||
@ -1412,7 +1414,7 @@ void Geometry::drawImplementation(RenderInfo& renderInfo) const
|
||||
//
|
||||
// Vertex Buffer Object path for defining vertex arrays.
|
||||
//
|
||||
#if 1
|
||||
#if 1
|
||||
|
||||
// first compile the VBO's
|
||||
const VertexBufferObject* prev_vbo = 0;
|
||||
@ -1566,7 +1568,7 @@ void Geometry::drawImplementation(RenderInfo& renderInfo) const
|
||||
_fogCoordData.offset = totalSize;
|
||||
if (_fogCoordData.array.valid()) totalSize += _fogCoordData.array->getTotalDataSize();
|
||||
|
||||
|
||||
unsigned int unit;
|
||||
for(unit=0;unit<_texCoordList.size();++unit)
|
||||
{
|
||||
_texCoordList[unit].offset = totalSize;
|
||||
@ -1670,7 +1672,8 @@ void Geometry::drawImplementation(RenderInfo& renderInfo) const
|
||||
state.setFogCoordPointer(GL_FLOAT,0,(const GLvoid*)_fogCoordData.offset);
|
||||
else
|
||||
state.disableFogCoordPointer();
|
||||
|
||||
|
||||
unsigned int unit;
|
||||
for(unit=0;unit<_texCoordList.size();++unit)
|
||||
{
|
||||
const Array* array = _texCoordList[unit].array.get();
|
||||
|
Loading…
Reference in New Issue
Block a user