summaryrefslogtreecommitdiff
path: root/src/mesa/main/macros.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-11 20:13:07 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-11 20:17:08 -0600
commit222c80893a738b964dc75796d47545d88e6a6973 (patch)
treeef2bc44d24b5a1bcd7b0f9602d2d004fed9bad98 /src/mesa/main/macros.h
parent77b794201a96300af4473307a7663500d62296e8 (diff)
mesa: refactor: move various ENUM_TO_x macros into macros.h
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r--src/mesa/main/macros.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index fbbcd4e269..2630855a0e 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -657,4 +657,11 @@ do { \
#define LEN_SQUARED_2FV( V ) ((V)[0]*(V)[0]+(V)[1]*(V)[1])
+/** casts to silence warnings with some compilers */
+#define ENUM_TO_INT(E) ((GLint)(E))
+#define ENUM_TO_FLOAT(E) ((GLfloat)(GLint)(E))
+#define ENUM_TO_DOUBLE(E) ((GLdouble)(GLint)(E))
+#define ENUM_TO_BOOLEAN(E) ((E) ? GL_TRUE : GL_FALSE)
+
+
#endif