mesa: refactor: move various ENUM_TO_x macros into macros.h

This commit is contained in:
Brian Paul
2008-06-11 20:13:07 -06:00
committed by Keith Whitwell
parent ae1fdc1523
commit ddd630ef90
7 changed files with 7 additions and 20 deletions

View File

@@ -19,10 +19,6 @@
#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
#define ENUM_TO_INT(E) ( (GLint) (E) )
#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )

View File

@@ -1129,10 +1129,6 @@ def EmitHeader():
#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
#define ENUM_TO_BOOLEAN(E) ( (E) ? GL_TRUE : GL_FALSE )
#define ENUM_TO_INT(E) ( (GLint) (E) )
#define ENUM_TO_FLOAT(E) ( (GLfloat) (E) )
#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )

View File

@@ -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

View File

@@ -37,8 +37,6 @@
#include "math/m_xform.h"
#define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X))
void GLAPIENTRY
_mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )

View File

@@ -37,10 +37,6 @@
#include "math/m_xform.h"
#define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X))
#define ENUM_TO_DOUBLE(X) ((GLdouble)(GLint)(X))
void GLAPIENTRY
_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )

View File

@@ -39,9 +39,6 @@
#include "main/teximage.h"
#define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X))
/**
* Check if a coordinate wrap mode is supported for the texture target.
* \return GL_TRUE if legal, GL_FALSE otherwise

View File

@@ -45,9 +45,6 @@
#include "math/m_xform.h"
#define ENUM_TO_FLOAT(X) ((GLfloat)(GLint)(X))
#define ENUM_TO_DOUBLE(X) ((GLdouble)(GLint)(X))
/**
* Default texture combine environment state. This is used to initialize