use GLfloat instead of float
This commit is contained in:
parent
9ad00aee7f
commit
fe93dffab0
@ -27,7 +27,7 @@ void guMatrixMult(guMatrix4x4 *m, guMatrix4x4 *a, guMatrix4x4 *b)
|
||||
{
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
float v = 0.0;
|
||||
GLfloat v = 0.0;
|
||||
for (p = 0; p < 4; p++)
|
||||
{
|
||||
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;
|
||||
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;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
float *base = &(*m)[i][0];
|
||||
GLfloat *base = &(*m)[i][0];
|
||||
base[0] *= x;
|
||||
base[1] *= y;
|
||||
base[2] *= z;
|
||||
@ -59,9 +59,9 @@ void guMatrixScale(guMatrix4x4 *m, float x, float y, float z)
|
||||
}
|
||||
|
||||
void guMatrixFrustum(guMatrix4x4 *m,
|
||||
float left, float right,
|
||||
float bottom, float top,
|
||||
float near, float far)
|
||||
GLfloat left, GLfloat right,
|
||||
GLfloat bottom, GLfloat top,
|
||||
GLfloat near, GLfloat far)
|
||||
{
|
||||
int i, j;
|
||||
guMatrix4x4 mult;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
typedef float guMatrix4x4[4][4];
|
||||
typedef GLfloat guMatrix4x4[4][4];
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -16,12 +16,12 @@ extern "C" {
|
||||
|
||||
void guMatrixLoadIdentity(guMatrix4x4 *m);
|
||||
void guMatrixMult(guMatrix4x4 *m, guMatrix4x4 *a, guMatrix4x4 *b);
|
||||
void guMatrixTranslate(guMatrix4x4 *m, float x, float y, float z);
|
||||
void guMatrixScale(guMatrix4x4 *m, float x, float y, float z);
|
||||
void guMatrixTranslate(guMatrix4x4 *m, GLfloat x, GLfloat y, GLfloat z);
|
||||
void guMatrixScale(guMatrix4x4 *m, GLfloat x, GLfloat y, GLfloat z);
|
||||
void guMatrixFrustum(guMatrix4x4 *m,
|
||||
float left, float right,
|
||||
float bottom, float top,
|
||||
float near, float far);
|
||||
GLfloat left, GLfloat right,
|
||||
GLfloat bottom, GLfloat top,
|
||||
GLfloat near, GLfloat far);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user