History

fix syntax issues for constant names and the CmakeLists.txt useless change

Sam Gateau committed 12 years ago

Commit ba2d0721 parent 4f26c9e3 files · +10 −10Browse files

Showing the changes to interface/src/renderer/GeometryCache.cpp (1 of 3 files). Show all

Unified · Split

interface/src/renderer/GeometryCache.cpp+6−6
@@ -114,12 +114,12 @@ void GeometryCache::renderHemisphere(int slices, int stacks) { · 113 unmodified lines
114void GeometryCache::renderSphere(float radius, int slices, int stacks) {114void GeometryCache::renderSphere(float radius, int slices, int stacks) {
115 VerticesIndices& vbo = _sphereVBOs[IntPair(slices, stacks)];115 VerticesIndices& vbo = _sphereVBOs[IntPair(slices, stacks)];
116 int vertices = slices * (stacks - 1) + 2;116 int vertices = slices * (stacks - 1) + 2;
117 int numVerticesPerTriangle = 3;117 const int NUM_VERTICES_PER_TRIANGLE = 3;
118 int numTrianglesPerQuad = 2;118 const int NUM_TRIANGLES_PER_QUAD = 2;
119 int indices = slices * numTrianglesPerQuad * numVerticesPerTriangle * (stacks - 1) + slices * numTrianglesPerQuad * numVerticesPerTriangle;119 int indices = slices * NUM_TRIANGLES_PER_QUAD * NUM_VERTICES_PER_TRIANGLE * (stacks - 1) + slices * NUM_TRIANGLES_PER_QUAD * NUM_VERTICES_PER_TRIANGLE;
120 if (vbo.first == 0) {120 if (vbo.first == 0) {
121 int numCoordinatesPerVertex = 3;121 const int NUM_COORDS_PER_VERTEX = 3;
122 GLfloat* vertexData = new GLfloat[vertices * numCoordinatesPerVertex];122 GLfloat* vertexData = new GLfloat[vertices * NUM_COORDS_PER_VERTEX];
123 GLfloat* vertex = vertexData;123 GLfloat* vertex = vertexData;
124 124
125 // south pole125 // south pole
@@ -148,7 +148,7 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks) { · 22 unmodified lines
148 148
149 glGenBuffers(1, &vbo.first);149 glGenBuffers(1, &vbo.first);
150 glBindBuffer(GL_ARRAY_BUFFER, vbo.first);150 glBindBuffer(GL_ARRAY_BUFFER, vbo.first);
151 const int BYTES_PER_VERTEX = numCoordinatesPerVertex * sizeof(GLfloat);151 const int BYTES_PER_VERTEX = NUM_COORDS_PER_VERTEX * sizeof(GLfloat);
152 glBufferData(GL_ARRAY_BUFFER, vertices * BYTES_PER_VERTEX, vertexData, GL_STATIC_DRAW);152 glBufferData(GL_ARRAY_BUFFER, vertices * BYTES_PER_VERTEX, vertexData, GL_STATIC_DRAW);
153 delete[] vertexData;153 delete[] vertexData;
154 154