Fixed glRotate
This commit is contained in:
parent
44155632c1
commit
e7d2042916
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user