add guMatrix3x3 and guMatrix4x4To3x3()
This commit is contained in:
parent
4758ebab87
commit
50789dee61
@ -190,6 +190,15 @@ void guMatrixOrtho(guMatrix4x4 *m,
|
|||||||
guMatrixMult(m, m, &mult);
|
guMatrixMult(m, m, &mult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void guMatrix4x4To3x3(guMatrix3x3 *out, const guMatrix4x4 *in)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
memcpy(&(*out)[i], &(*in)[i], sizeof((*out)[0][0] * 3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
char *guGetShaderLog(GLuint id)
|
char *guGetShaderLog(GLuint id)
|
||||||
{
|
{
|
||||||
GLint log_length;
|
GLint log_length;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef GLfloat guMatrix3x3[3][3];
|
||||||
typedef GLfloat guMatrix4x4[4][4];
|
typedef GLfloat guMatrix4x4[4][4];
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GLuint index;
|
GLuint index;
|
||||||
@ -35,6 +36,8 @@ void guMatrixOrtho(guMatrix4x4 *m,
|
|||||||
GLfloat bottom, GLfloat top,
|
GLfloat bottom, GLfloat top,
|
||||||
GLfloat near, GLfloat far);
|
GLfloat near, GLfloat far);
|
||||||
|
|
||||||
|
void guMatrix4x4To3x3(guMatrix3x3 *out, const guMatrix4x4 *in);
|
||||||
|
|
||||||
char *guGetShaderLog(GLuint id);
|
char *guGetShaderLog(GLuint id);
|
||||||
char *guGetProgramLog(GLuint id);
|
char *guGetProgramLog(GLuint id);
|
||||||
GLuint guMakeShaderFromFile(GLenum shaderType, const char *fname);
|
GLuint guMakeShaderFromFile(GLenum shaderType, const char *fname);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user