I am trying to import .obj files but cant even get a triangle rendered. Here is what I’m trying to do just to test if it can show something.
glBegin(GL_TRIANGLES);
glColor3f(0.5, 0.5, 0.5);
glVertex3f(0, 0, 0);
glVertex3f(1, 1, 1);
glVertex3f(2, 2, 2);
glEnd();
This doesn’t display anything. However when I change GL_TRIANGLES for GL_LINES it displays the line.
How can I get the triangle to display?
Language: C++
OS: Mac 10.7.3
A triangle where all three points are colinear (in the same line) has zero area. And a triangle renderer only renders the area of a triangle, not the edges of it. So it renders zero pixels.