Fixed Coverity reported issue.

CID 11414: Logically dead code (DEADCODE)
After this line, the value of "vboMemory" is equal to 0.
Assigning: "vboMemory" = "NULL".

Another case of debugging code paths being picked out. I have chosen to just delete these paths as the code
looks to be working fine and less code is better than more code when it comes to maintenance.
This commit is contained in:
Robert Osfield 2011-04-28 10:22:20 +00:00
parent c32b72e8c5
commit bef8dedce0

View File

@ -189,12 +189,6 @@ void GLBufferObject::compileBuffer()
_extensions->glBufferData(_profile._target, _profile._size, NULL, _profile._usage);
}
char* vboMemory = 0;
#if 0
vboMemory = extensions->glMapBuffer(_target, GL_WRITE_ONLY_ARB);
#endif
for(BufferEntries::iterator itr = _bufferEntries.begin();
itr != _bufferEntries.end();
++itr)
@ -205,18 +199,10 @@ void GLBufferObject::compileBuffer()
// OSG_NOTICE<<"GLBufferObject::compileBuffer(..) downloading BufferEntry "<<&entry<<std::endl;
entry.modifiedCount = entry.dataSource->getModifiedCount();
if (vboMemory)
memcpy(vboMemory + (GLsizeiptrARB)entry.offset, entry.dataSource->getDataPointer(), entry.dataSize);
else
_extensions->glBufferSubData(_profile._target, (GLintptrARB)entry.offset, (GLsizeiptrARB)entry.dataSize, entry.dataSource->getDataPointer());
}
}
// Unmap the texture image buffer
if (vboMemory) _extensions->glUnmapBuffer(_profile._target);
}
void GLBufferObject::deleteGLObject()