use GLfloat instead of float

This commit is contained in:
Josh Holtrop 2011-05-09 16:45:50 -04:00
parent 9ad00aee7f
commit fe93dffab0
2 changed files with 13 additions and 13 deletions

View File

@ -27,7 +27,7 @@ void guMatrixMult(guMatrix4x4 *m, guMatrix4x4 *a, guMatrix4x4 *b)
{ {
for (j = 0; j < 4; j++) for (j = 0; j < 4; j++)
{ {
float v = 0.0; GLfloat v = 0.0;
for (p = 0; p < 4; p++) for (p = 0; p < 4; p++)
{ {
v += (*a)[i][p] * (*b)[p][j]; v += (*a)[i][p] * (*b)[p][j];
@ -37,7 +37,7 @@ void guMatrixMult(guMatrix4x4 *m, guMatrix4x4 *a, guMatrix4x4 *b)
} }
} }
void guMatrixTranslate(guMatrix4x4 *m, float x, float y, float z) void guMatrixTranslate(guMatrix4x4 *m, GLfloat x, GLfloat y, GLfloat z)
{ {
int i; int i;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
@ -46,12 +46,12 @@ void guMatrixTranslate(guMatrix4x4 *m, float x, float y, float z)
} }
} }
void guMatrixScale(guMatrix4x4 *m, float x, float y, float z) void guMatrixScale(guMatrix4x4 *m, GLfloat x, GLfloat y, GLfloat z)
{ {
int i; int i;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
float *base = &(*m)[i][0]; GLfloat *base = &(*m)[i][0];
base[0] *= x; base[0] *= x;
base[1] *= y; base[1] *= y;
base[2] *= z; base[2] *= z;
@ -59,9 +59,9 @@ void guMatrixScale(guMatrix4x4 *m, float x, float y, float z)
} }
void guMatrixFrustum(guMatrix4x4 *m, void guMatrixFrustum(guMatrix4x4 *m,
float left, float right, GLfloat left, GLfloat right,
float bottom, float top, GLfloat bottom, GLfloat top,
float near, float far) GLfloat near, GLfloat far)
{ {
int i, j; int i, j;
guMatrix4x4 mult; guMatrix4x4 mult;

View File

@ -8,7 +8,7 @@
#include <GL/gl.h> #include <GL/gl.h>
#endif #endif
typedef float guMatrix4x4[4][4]; typedef GLfloat guMatrix4x4[4][4];
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -16,12 +16,12 @@ extern "C" {
void guMatrixLoadIdentity(guMatrix4x4 *m); void guMatrixLoadIdentity(guMatrix4x4 *m);
void guMatrixMult(guMatrix4x4 *m, guMatrix4x4 *a, guMatrix4x4 *b); void guMatrixMult(guMatrix4x4 *m, guMatrix4x4 *a, guMatrix4x4 *b);
void guMatrixTranslate(guMatrix4x4 *m, float x, float y, float z); void guMatrixTranslate(guMatrix4x4 *m, GLfloat x, GLfloat y, GLfloat z);
void guMatrixScale(guMatrix4x4 *m, float x, float y, float z); void guMatrixScale(guMatrix4x4 *m, GLfloat x, GLfloat y, GLfloat z);
void guMatrixFrustum(guMatrix4x4 *m, void guMatrixFrustum(guMatrix4x4 *m,
float left, float right, GLfloat left, GLfloat right,
float bottom, float top, GLfloat bottom, GLfloat top,
float near, float far); GLfloat near, GLfloat far);
#ifdef __cplusplus #ifdef __cplusplus
} }