From 9356d1a27d61158f77cdfdd00a682d7f349c9767 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Mon, 24 Jun 2013 17:16:06 -0700 Subject: [PATCH] Turns out sincos is a GNU thing. --- interface/src/renderer/GeometryCache.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/interface/src/renderer/GeometryCache.cpp b/interface/src/renderer/GeometryCache.cpp index c2321c5f51..28a9cf0ba6 100644 --- a/interface/src/renderer/GeometryCache.cpp +++ b/interface/src/renderer/GeometryCache.cpp @@ -25,18 +25,14 @@ void GeometryCache::renderHemisphere(int slices, int stacks) { GLfloat* vertexData = new GLfloat[vertices * 3]; GLfloat* vertex = vertexData; for (int i = 0; i < stacks - 1; i++) { - float phi = PIf * 0.5f * i / (stacks - 1), z, radius; - sincosf(phi, &z, &radius); + float phi = PIf * 0.5f * i / (stacks - 1); + float z = sinf(phi), radius = cosf(phi); for (int j = 0; j < slices; j++) { float theta = PIf * 2.0f * j / slices; - float x, y; - sincosf(theta, &x, &y); - x *= radius; - y *= radius; - - *(vertex++) = x; - *(vertex++) = y; + + *(vertex++) = sinf(theta) * radius; + *(vertex++) = cosf(theta) * radius; *(vertex++) = z; } }