am 3199e150: Merge "Fixed array-index-out-of-bound in Teapot sample"

* commit '3199e1502382a037e6bb9b3ae11429fc18fe9917':
  Fixed array-index-out-of-bound in Teapot sample
This commit is contained in:
Andrew Hsieh
2013-09-17 18:38:45 -07:00
committed by Android Git Automerger

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];