Fixed a bug where a static buffer could sometimes be used if it had not had data written to it.

TRAC #22665 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1951 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent d89f1943
......@@ -165,7 +165,7 @@ GLenum IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buffer
storage->markBufferUsage();
computeRange(type, indices, count, &translated->minIndex, &translated->maxIndex);
}
else if (staticBuffer && staticBuffer->getIndexType() == type && alignedOffset)
else if (staticBuffer && staticBuffer->getBufferSize() != 0 && staticBuffer->getIndexType() == type && alignedOffset)
{
indexBuffer = staticBuffer;
streamOffset = staticBuffer->lookupRange(offset, count, &translated->minIndex, &translated->maxIndex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment