Making the spaceball demo a bit more elegant per e-mail from John Tsiombikas dated 8:45 PM, 11/10/09.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@845 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2009-11-11 03:30:06 +00:00
parent 0be6f5a309
commit aaaac4abe3
2 changed files with 4 additions and 12 deletions

View File

@ -62,15 +62,7 @@ void disp(void)
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(pos.x, pos.y, pos.z);
#if defined(WIN32)
/* This is STRICTLY a place-holder until we get this working properly for windows.
* I do not pretend that this is equivalent to the non-Windows equivalent. I just
* want the thing to build without errors.
*/
glMultMatrixf((float*)xform);
#else
glMultTransposeMatrixf((float*)xform);
#endif
draw_cube();

View File

@ -61,8 +61,8 @@ static INLINE void m4_cons(mat4_t m,
float m31, float m32, float m33, float m34,
float m41, float m42, float m43, float m44)
{
m[0][0] = m11; m[0][1] = m12; m[0][2] = m13; m[0][3] = m14;
m[1][0] = m21; m[1][1] = m22; m[1][2] = m23; m[1][3] = m24;
m[2][0] = m31; m[2][1] = m32; m[2][2] = m33; m[2][3] = m34;
m[3][0] = m41; m[3][1] = m42; m[3][2] = m43; m[3][3] = m44;
m[0][0] = m11; m[1][0] = m12; m[2][0] = m13; m[3][0] = m14;
m[0][1] = m21; m[1][1] = m22; m[2][1] = m23; m[3][1] = m24;
m[0][2] = m31; m[1][2] = m32; m[2][2] = m33; m[3][2] = m34;
m[0][3] = m41; m[1][3] = m42; m[2][3] = m43; m[3][3] = m44;
}