Merge "Fixed array-index-out-of-bound in Teapot sample"

This commit is contained in:
Andrew Hsieh
2013-09-18 01:36:02 +00:00
committed by Gerrit Code Review

View File

@@ -62,7 +62,7 @@ void TeapotRenderer::init()
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
//Create VBO
_iNumVertices = sizeof(teapotPositions) / sizeof(teapotPositions[0]);
_iNumVertices = sizeof(teapotPositions) / sizeof(teapotPositions[0]) / 3;
int32_t iStride = sizeof(TEAPOT_VERTEX);
int32_t iIndex = 0;
TEAPOT_VERTEX* p = new TEAPOT_VERTEX[_iNumVertices];