mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
mesa: refactor: move various ENUM_TO_x macros into macros.h
This commit is contained in:
parent
ae1fdc1523
commit
ddd630ef90
7 changed files with 7 additions and 20 deletions
|
|
@ -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 )
|
||||
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue