Steve Sloan II [I knew you would be the fist to jump :-)] wrote: > >> I must be doing something _really_ stupid, but why I can't >> draw even a simple tetrahedron with OpenGL? One of the faces >> does not show :-/ >> >> Is there any magic word that I must utter before it works? > > I have two guesses: > > 1) Could OpenGL be culling the back-facing polygons? Try > changing GL_FRONT to GL_FRONT_AND_BACK in various places, > and see if that fixes it. > No, the program behaved even more strangely with this.
> 2) How are you drawing the tetrahedron? Are you using > GL_TRIANGLES, > Yes. The program is as simple as possible, and all but the first triangle appear correctly. The first triangle, however, is invisible. Essentially, this is the OpenGL part of the program: glLoadIdentity(); glTranslatef(0.0f,0.0f,-15.0f); glRotated(m_angulo, m_x, m_y, m_z); glBegin(GL_TRIANGLES); // Draw Triangles glNormal3f(1.0f, 1.0f, 1.0f); // should be the yellow face, but is invisible glColor3f(1.0f, 1.0f, 0.0f); glVertex3f(1.0f, 0.0f, 0.0f); glVertex3f(0.0f, 1.0f, 0.0f); glVertex3f(0.0f, 0.0f, 1.0f); glColor3f(0.5f, 0.0f, 0.0f); glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(1.0f, 0.0f, 0.0f); glVertex3f(0.0f, 1.0f, 0.0f); glColor3f(0.0f, 0.5f, 0.0f); glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(0.0f, 1.0f, 0.0f); glVertex3f(0.0f, 0.0f, 1.0f); glColor3f(0.0f, 0.0f, 0.5f); glVertex3f(0.0f, 0.0f, 0.0f); glVertex3f(0.0f, 0.0f, 1.0f); glVertex3f(1.0f, 0.0f, 0.0f); glEnd(); glLoadIdentity(); // Reset The interesting thing is that, if I begin with the Red Face, then the Yellow Face becomes visible and the Red Face becomes invisible. Alberto Monteiro _______________________________________________ http://www.mccmedia.com/mailman/listinfo/brin-l