From 222c80893a738b964dc75796d47545d88e6a6973 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 11 Jun 2008 20:13:07 -0600 Subject: mesa: refactor: move various ENUM_TO_x macros into macros.h --- src/mesa/main/macros.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/main/macros.h') diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index fbbcd4e269e..2630855a0ea 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 -- cgit v1.2.3