diff options
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r-- | src/mesa/main/macros.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 |