Demos (master): glsl: rad1/rad2 are #defines on windows.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Wed Mar 9 15:15:15 UTC 2011
Module: Demos
Branch: master
Commit: 5d6062e75328137fba8792dc7cfcbec68271a3e5
URL: http://cgit.freedesktop.org/mesa/demos/commit/?id=5d6062e75328137fba8792dc7cfcbec68271a3e5
Author: José Fonseca <jfonseca at vmware.com>
Date: Wed Mar 9 15:13:16 2011 +0000
glsl: rad1/rad2 are #defines on windows.
---
src/glsl/fsraytrace.c | 12 ++++++------
src/glsl/vsraytrace.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/glsl/fsraytrace.c b/src/glsl/fsraytrace.c
index af72a99..ea68b50 100644
--- a/src/glsl/fsraytrace.c
+++ b/src/glsl/fsraytrace.c
@@ -238,12 +238,12 @@ deg2rad(const float degree)
static void
rotate_xy(float* mat3, const float degreesAroundX, const float degreesAroundY)
{
- const float rad1 = deg2rad(degreesAroundX);
- const float c1 = cosf(rad1);
- const float s1 = sinf(rad1);
- const float rad2 = deg2rad(degreesAroundY);
- const float c2 = cosf(rad2);
- const float s2 = sinf(rad2);
+ const float radX = deg2rad(degreesAroundX);
+ const float c1 = cosf(radX);
+ const float s1 = sinf(radX);
+ const float radY = deg2rad(degreesAroundY);
+ const float c2 = cosf(radY);
+ const float s2 = sinf(radY);
mat3[0] = c2; mat3[3] = 0.0F; mat3[6] = s2;
mat3[1] = s1*s2; mat3[4] = c1; mat3[7] = -s1*c2;
mat3[2] = -c1*s2;mat3[5] = s1; mat3[8] = c1*c2;
diff --git a/src/glsl/vsraytrace.c b/src/glsl/vsraytrace.c
index 64d9288..48c0f3a 100644
--- a/src/glsl/vsraytrace.c
+++ b/src/glsl/vsraytrace.c
@@ -229,12 +229,12 @@ deg2rad(const float degree)
static void
rotate_xy(float* mat3, const float degreesAroundX, const float degreesAroundY)
{
- const float rad1 = deg2rad(degreesAroundX);
- const float c1 = cosf(rad1);
- const float s1 = sinf(rad1);
- const float rad2 = deg2rad(degreesAroundY);
- const float c2 = cosf(rad2);
- const float s2 = sinf(rad2);
+ const float radX = deg2rad(degreesAroundX);
+ const float c1 = cosf(radX);
+ const float s1 = sinf(radX);
+ const float radY = deg2rad(degreesAroundY);
+ const float c2 = cosf(radY);
+ const float s2 = sinf(radY);
mat3[0] = c2; mat3[3] = 0.0F; mat3[6] = s2;
mat3[1] = s1*s2; mat3[4] = c1; mat3[7] = -s1*c2;
mat3[2] = -c1*s2;mat3[5] = s1; mat3[8] = c1*c2;
More information about the mesa-commit
mailing list