diff options
Diffstat (limited to 'main/mesa-demos/sincos.patch')
-rw-r--r-- | main/mesa-demos/sincos.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/mesa-demos/sincos.patch b/main/mesa-demos/sincos.patch new file mode 100644 index 0000000000..38da0285d1 --- /dev/null +++ b/main/mesa-demos/sincos.patch @@ -0,0 +1,32 @@ +--- ./src/egl/opengles2/es2gears.c.orig ++++ ./src/egl/opengles2/es2gears.c +@@ -109,13 +109,15 @@ + c[4] = 1; + v = gear->vertices; + for (i = 0; i < teeth; i++) { ++ GLint j; + s[0] = s[4]; + c[0] = c[4]; +- sincos(i * 2.0 * M_PI / teeth + da, &s[1], &c[1]); +- sincos(i * 2.0 * M_PI / teeth + da * 2, &s[2], &c[2]); +- sincos(i * 2.0 * M_PI / teeth + da * 3, &s[3], &c[3]); +- sincos(i * 2.0 * M_PI / teeth + da * 4, &s[4], &c[4]); + ++ for (j=1; j <=4; j++) { ++ s[j] = sin(i * 2.0 * M_PI / teeth + da * j); ++ c[j] = cos(i * 2.0 * M_PI / teeth + da * j); ++ } ++ + normal[0] = 0.0; + normal[1] = 0.0; + normal[2] = 1.0; +@@ -199,7 +201,8 @@ + { + double s, c; + +- sincos(angle, &s, &c); ++ s = sin(angle); ++ c = cos(angle); + GLfloat r[16] = { + x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0, + x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0, |