Fixed glRotate

This commit is contained in:
Andress Barajas 2020-10-02 19:31:22 -07:00
parent 44155632c1
commit e7d2042916

View File

@ -187,9 +187,11 @@ void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
};
float r = DEG2RAD * angle;
float c = cos(r);
float s = sin(r);
vec3f_normalize(x, y, z);
float invc = 1.0f - c;
float xs = x * s;
float zs = z * s;
@ -198,8 +200,6 @@ void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
float xy = y * x;
float yz = y * z;
vec3f_normalize(x, y, z);
rotate[M0] = (x * x) * invc + c;
rotate[M1] = xy * invc + zs;
rotate[M2] = xz * invc - ys;