|
#define | ASSERT(X) |
|
#define | MAX_GLUSHORT 0xffff |
|
#define | MAX_GLUINT 0xffffffff |
|
#define | COPY_2V(DST, SRC) |
|
#define | COPY_3V(DST, SRC) |
|
#define | COPY_4V(DST, SRC) |
|
#define | COPY_4UBV(DST, SRC) |
|
#define | ASSIGN_2V(V, V0, V1) V[0] = V0; V[1] = V1; |
|
#define | ASSIGN_3V(V, V0, V1, V2) V[0] = V0; V[1] = V1; V[2] = V2; |
|
#define | ASSIGN_4V(V, V0, V1, V2, V3) |
|
#define | INSIDE_BEGIN_END(CTX) ((CTX)->Primitive!=GL_BITMAP) |
|
#define | ABSI(X) ((X) < 0 ? -(X) : (X)) |
|
#define | ABSF(X) ((X) < 0.0F ? -(X) : (X)) |
|
#define | ABSD(X) ((X) < 0.0 ? -(X) : (X)) |
|
#define | ROUNDF(X) ( (X)<0.0F ? ((GLint) ((X)-0.5F)) : ((GLint) ((X)+0.5F)) ) |
|
#define | CEILING(A, B) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 ) |
|
#define | CLAMP(X, MIN, MAX) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) ) |
|
#define | MIN2(A, B) ( (A)<(B) ? (A) : (B) ) |
|
#define | MAX2(A, B) ( (A)>(B) ? (A) : (B) ) |
|
#define | DOT3(a, b) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] ) |
|
#define | DOT4(a, b) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] ) |
|
#define | UBYTE_TO_FLOAT(B) ((GLfloat) (B) * (1.0F / 255.0F)) |
|
#define | FLOAT_TO_UBYTE(X) ((GLubyte) (GLint) (((X)) * 255.0F)) |
|
#define | BYTE_TO_FLOAT(B) ((2.0F * (B) + 1.0F) * (1.0F/255.0F)) |
|
#define | FLOAT_TO_BYTE(X) ( (((GLint) (255.0F * (X))) - 1) / 2 ) |
|
#define | USHORT_TO_FLOAT(S) ((GLfloat) (S) * (1.0F / 65535.0F)) |
|
#define | FLOAT_TO_USHORT(X) ((GLushort) (GLint) ((X) * 65535.0F)) |
|
#define | SHORT_TO_FLOAT(S) ((2.0F * (S) + 1.0F) * (1.0F/65535.0F)) |
|
#define | FLOAT_TO_SHORT(X) ( (((GLint) (65535.0F * (X))) - 1) / 2 ) |
|
#define | UINT_TO_FLOAT(U) ((GLfloat) (U) * (1.0F / 4294967295.0F)) |
|
#define | FLOAT_TO_UINT(X) ((GLuint) ((X) * 4294967295.0)) |
|
#define | INT_TO_FLOAT(I) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0F)) |
|
#define | FLOAT_TO_INT(X) ( (GLint) (2147483647.0 * (X)) ) |
|
#define | MEMCPY(DST, SRC, BYTES) memcpy( (void *) (DST), (void *) (SRC), (size_t) (BYTES) ) |
|
#define | MEMSET(DST, VAL, N) memset( (void *) (DST), (int) (VAL), (size_t) (N) ) |
|
#define | DEFARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE] |
|
#define | UNDEFARRAY(NAME) |
|
#define | M_PI (3.1415926) |
|
#define | DEG2RAD (M_PI/180.0) |
|
#define | NULL 0 |
|