OpenGL Surface question. Two faced triangles!

If I want to draw a triangle i can define the face orientation by the winding order of the triangle, but how can I color on side red and the other side green without drawing two triangles?

Hi Brian,

In theory, the program should use gl_FrontFacing to determine the two colours based on the boolean value.

The program will also need to draw both sides of the same triangle and disable culling to allow this to happen:

I haven’t created a program to do this, and it should work (famous last words) :slight_smile:

1 Like