View Full Version : What will be the facing of co-linear triangle?

11-17-2008, 01:28 AM
As title. "co-linear" I mean two of the three vertexs is the same.

The problem is, my program draw this kind of triangle all the time, with culling on, no matter culling front or back.

I am not sure if I have enabled or making something wrong to openGL, causing this kind of triangle to be shown, which shouldn't show.

Anyone know the reason? Thanks!

11-17-2008, 01:58 AM
Since such triangles are not defining a surface, they should - mathematically - not have any facing. So, i would assume that the outcome of face-culling is implementation defined. On your hardware (which is it?) it seems to not to cull such faces at all.


11-17-2008, 02:15 AM
A triangle with two identical vertices has no area and will never produce any fragments on a conformant OpenGL implementation.

11-17-2008, 04:23 AM
Degenerate is probably a better term for the duplicate vertex case, though 3 collinear points would also produce a zero area triangle, without any duplicates. In other words, a triangle can "degenerate" into a line or a point.

11-17-2008, 06:53 AM
Actually, the collinear triangle doesn't show up in FILL mode, but when I render in wireframe, it will be shown.

I have posted the images in the following thread:
This is the topic I wrote here (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=248683&fpart=2)

The read line is the collinear triangle, I am sure that they didn't drawn before, but after a lot of program modification, suddently they appear. :(