History

Turns out sincos is a GNU thing.

Andrzej Kapolka committed 13 years ago

Commit 9356d1a1 parent b36404f1 file · +5 −9Browse files

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

Unified · Split

interface/src/renderer/GeometryCache.cpp+5−9
@@ -25,18 +25,14 @@ void GeometryCache::renderHemisphere(int slices, int stacks) { · 24 unmodified lines
25 GLfloat* vertexData = new GLfloat[vertices * 3];25 GLfloat* vertexData = new GLfloat[vertices * 3];
26 GLfloat* vertex = vertexData;26 GLfloat* vertex = vertexData;
27 for (int i = 0; i < stacks - 1; i++) {27 for (int i = 0; i < stacks - 1; i++) {
28 float phi = PIf * 0.5f * i / (stacks - 1), z, radius;28 float phi = PIf * 0.5f * i / (stacks - 1);
29 sincosf(phi, &z, &radius);29 float z = sinf(phi), radius = cosf(phi);
30 30
31 for (int j = 0; j < slices; j++) {31 for (int j = 0; j < slices; j++) {
32 float theta = PIf * 2.0f * j / slices;32 float theta = PIf * 2.0f * j / slices;
33 float x, y;33
34 sincosf(theta, &x, &y);34 *(vertex++) = sinf(theta) * radius;
35 x *= radius;35 *(vertex++) = cosf(theta) * radius;
36 y *= radius;
37
38 *(vertex++) = x;
39 *(vertex++) = y;
40 *(vertex++) = z;36 *(vertex++) = z;
41 }37 }
42 }38 }