huangzl99
11-10-2001, 04:49 PM
hi, I construct the rotation matrix with opengl, like this:
main(){
double angle=90.0, temp[16],aixs[3];
axis[0]=0;
axis[1]=1;
axis[2]=0;
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRotated(angle,axis[0],axis[1],axis[2]);
glGetDoublev(GL_MODELVIEW_MATRIX,temp);
//temp is the rotation/trans matrix
....
}
but when I run it, temp simply dose not been changed by the opengl, what wrong with this code? it there an initialization to opengl?
need help, thanks you.
main(){
double angle=90.0, temp[16],aixs[3];
axis[0]=0;
axis[1]=1;
axis[2]=0;
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRotated(angle,axis[0],axis[1],axis[2]);
glGetDoublev(GL_MODELVIEW_MATRIX,temp);
//temp is the rotation/trans matrix
....
}
but when I run it, temp simply dose not been changed by the opengl, what wrong with this code? it there an initialization to opengl?
need help, thanks you.