#96927 - Rajveer - Sun Aug 06, 2006 5:18 pm
hi guys, i have a problem with the modelview matrix.
when i call glLoadIdentity();, push this onto the matrix stack, translate it with glTranslatef(so its in the view) and render my model it works fine, so do rotations with glRotate.
now ive defined my own matrix[16], and changed values so its the identity matrix too, as in the following:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
the translation vector (4th column, rows 1-3) translate the object fine, but for some reason the object is not drawn properly (as in vertices are sharing the same coords or something).
multiplying it with rotation matrix with a call from glRotate doesnt rotate it properly, it seems to be rotating at weird intervals and even then not properly.
at the moment the matrix is defined as s32, changing to float screws things up more as even changing the translation vector doesnt do anything now.
anybody got any ideas?
when i call glLoadIdentity();, push this onto the matrix stack, translate it with glTranslatef(so its in the view) and render my model it works fine, so do rotations with glRotate.
now ive defined my own matrix[16], and changed values so its the identity matrix too, as in the following:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
the translation vector (4th column, rows 1-3) translate the object fine, but for some reason the object is not drawn properly (as in vertices are sharing the same coords or something).
multiplying it with rotation matrix with a call from glRotate doesnt rotate it properly, it seems to be rotating at weird intervals and even then not properly.
at the moment the matrix is defined as s32, changing to float screws things up more as even changing the translation vector doesnt do anything now.
anybody got any ideas?