古詩詞大全網 - 成語用法 - opengl gluCylinder()畫圓柱

opengl gluCylinder()畫圓柱

如果默認是在z軸,那就繞x軸旋轉-90度,圓柱就到y軸上了:

glPushMatrix();

glRotatef( -90, 1, 0, 0 );

gluCylinder(xxxxxxx);

glPopMatrix();