Alberto Monteiro wrote:
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);
I think you should get rid of the glNormal statement. It's not
the correct normal for a flat triangle with the vertices you've
given. If the object you want to create has perfectly flat
faces, you should avoid specifying normals at all. Just let
OpenGL automatically generate the correct normal. You should
only specify normals if you're trying to create a smoothly
curving object.
______________________________________________________________________
Steve Sloan ......... Huntsville, Alabama =========> [EMAIL PROTECTED]
Brin-L list pages .............................. http://www.brin-l.org
Science Fiction-themed online store ..... http://www.sloan3d.com/store
Chmeee's 3D Objects .................... http://www.sloan3d.com/chmeee
3D and Drawing Galleries .................. http://www.sloansteady.com
Software ................ Science Fiction, Science, and Computer Links
Science fiction scans ......................... http://www.sloan3d.com
_______________________________________________
http://www.mccmedia.com/mailman/listinfo/brin-l