javier-martinez-palmer / oglsuperbible5

Automatically exported from code.google.com/p/oglsuperbible5
0 stars 0 forks source link

Chapter 3 - Primitives program #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Line 138-142 are wrong and -anyway- not essential.
    // Close the fan
    nVerts++;
    vPoints[nVerts][0] = r;
    vPoints[nVerts][1] = 0;
    vPoints[nVerts][2] = 0.0f;

The vPoints array has already 8 vertices and closes correctly. Those lines of 
code create a 9th vertex which wont be picked up by  
triangleFanBatch.Begin(GL_TRIANGLE_FAN, 8); and anyway define a vertex in a 
wrong position (the z coordinate should be -0.5f;

Original issue reported on code.google.com by mattja...@gmail.com on 28 May 2011 at 10:10