PDA

View Full Version : Rotating Problem



amstel
03-15-2002, 06:08 PM
I have a simple object of solid cube.Once I rotated it in any angle,then some face disappear.

I created my solid cube by this way,

//Left face
glBengin(GL_QUADS);
glVertex3d(x1,y1,z1);
...
glVertex3d(x4,y4,z4);
glEnd();

and similar code on other face

What the remedy I should to do?
Please note that , I don't want to use the glut and gluax library.

Old GLman
03-15-2002, 06:38 PM
Hi, let me see if I can answer your question. OpenGL assumes counterclockwise wound polygons are front facing. If you specified the vertices for the faces on your cube in a clockwise order, then you need to do glFrontFace(GL_CW). This will tell OpenGL that clockwise wound polygons should be front facing. If this doesnt help, please respond and be a bit more specific http://www.opengl.org/discussion_boards/ubb/smile.gif

Old GLman

[This message has been edited by Old GLman (edited 03-15-2002).]

amstel
03-15-2002, 07:56 PM
Thansk a lot,

I placed "glFrontFace(GL_CW)" into drawing routine and it can't help me. And I try to change one to "glFrontFace(GL_CCw)", the same result is shown.

amstel

amstel
03-15-2002, 08:04 PM
I'm sorry,I'm mistake. It can help me so well.

Thanks you so much.
Amstel.