aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2012-04-05 01:41:16 -0400
committerBehdad Esfahbod <behdad@behdad.org>2012-04-05 01:41:42 -0400
commit448b5333ebdabac059a2481160d707e12afb97ee (patch)
tree7a2d78a98ac5bda474f91e249e4dbd9db651ec7a
parentefb9cef385e4d2e38ea6517fa707822d78d8b5f0 (diff)
Make hello_world_gles build on the Mac natively
Useful for testing only.
-rw-r--r--tests/hello_world_gles.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/hello_world_gles.c b/tests/hello_world_gles.c
index 4f2cb45c..aa0fc02d 100644
--- a/tests/hello_world_gles.c
+++ b/tests/hello_world_gles.c
@@ -46,17 +46,25 @@
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#include <Glut/glut.h>
+#else
#include <GL/gl.h>
#include <GL/glut.h>
-
-#ifndef HAVE_BUILTIN_SINCOS
-#include "sincos.h"
#endif
#define STRIPS_PER_TOOTH 7
#define VERTICES_PER_TOOTH 34
#define GEAR_VERTEX_STRIDE 6
+static void
+sincos (double a, double *s, double *c)
+{
+ *s = sin (a);
+ *c = cos (a);
+}
+
/**
* Struct describing the vertices in triangle strip
*/