diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-03 16:23:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-03 16:23:24 -0700 |
commit | 80ed60983b3f9b51bf6d6622e44b08b894e7fd9d (patch) | |
tree | 0a2a53abf91c4795b7d9b08337979e8a6b6e8f82 /tests/glbook/Common/esShapes.c | |
parent | 9cc7f9fa7a110e6c53f7df7583b40087459d5877 (diff) |
add another working glbook testcase
Diffstat (limited to 'tests/glbook/Common/esShapes.c')
-rw-r--r-- | tests/glbook/Common/esShapes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/glbook/Common/esShapes.c b/tests/glbook/Common/esShapes.c index aecd37ce..6a8ab7ad 100644 --- a/tests/glbook/Common/esShapes.c +++ b/tests/glbook/Common/esShapes.c @@ -52,11 +52,11 @@ /// if it is not NULL ) as a GL_TRIANGLE_STRIP // int ESUTIL_API esGenSphere ( int numSlices, float radius, GLfloat **vertices, GLfloat **normals, - GLfloat **texCoords, GLuint **indices ) + GLfloat **texCoords, GLushort **indices ) { int i; int j; - int numParallels = numSlices / 2; + int numParallels = numSlices; int numVertices = ( numParallels + 1 ) * ( numSlices + 1 ); int numIndices = numParallels * numSlices * 6; float angleStep = (2.0f * ES_PI) / ((float) numSlices); @@ -72,7 +72,7 @@ int ESUTIL_API esGenSphere ( int numSlices, float radius, GLfloat **vertices, GL *texCoords = malloc ( sizeof(GLfloat) * 2 * numVertices ); if ( indices != NULL ) - *indices = malloc ( sizeof(GLuint) * numIndices ); + *indices = malloc ( sizeof(GLushort) * numIndices ); for ( i = 0; i < numParallels + 1; i++ ) { @@ -108,7 +108,7 @@ int ESUTIL_API esGenSphere ( int numSlices, float radius, GLfloat **vertices, GL // Generate the indices if ( indices != NULL ) { - GLuint *indexBuf = (*indices); + GLushort *indexBuf = (*indices); for ( i = 0; i < numParallels ; i++ ) { for ( j = 0; j < numSlices; j++ ) |