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:
parent
c32b72e8c5
commit
bef8dedce0
@ -189,12 +189,6 @@ void GLBufferObject::compileBuffer()
|
|||||||
_extensions->glBufferData(_profile._target, _profile._size, NULL, _profile._usage);
|
_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();
|
for(BufferEntries::iterator itr = _bufferEntries.begin();
|
||||||
itr != _bufferEntries.end();
|
itr != _bufferEntries.end();
|
||||||
++itr)
|
++itr)
|
||||||
@ -205,18 +199,10 @@ void GLBufferObject::compileBuffer()
|
|||||||
// OSG_NOTICE<<"GLBufferObject::compileBuffer(..) downloading BufferEntry "<<&entry<<std::endl;
|
// OSG_NOTICE<<"GLBufferObject::compileBuffer(..) downloading BufferEntry "<<&entry<<std::endl;
|
||||||
entry.modifiedCount = entry.dataSource->getModifiedCount();
|
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());
|
_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()
|
void GLBufferObject::deleteGLObject()
|
||||||
|
Loading…
Reference in New Issue
Block a user