I have the following code in the display function:
glEnable(GL_CULL_FACE);
glColor3f(0.0, 1.0, 0.0);
glCullFace(GL_BACK);
glMultiDrawElements(GL_TRIANGLE_STRIP, countIndices, GL_UNSIGNED_INT, (const void **)offsets, LAT_SLICES);
glColor3f(1.0, 0.0, 0.0);
glCullFace(GL_FRONT);
glMultiDrawElements(GL_TRIANGLE_STRIP, countIndices, GL_UNSIGNED_INT, (const void **)offsets, LAT_SLICES);
It draws the misphere fine with the outside red and the inside green. I tried to witch the colors in 3 different ways:
1) interchange the glColor3f calls and it worked fine.
2) interchange the glCullFace calls but it gave me all green for both sides.
3) insert a glFrontFace(CW) but also gave me a single color for both sides.
Can someone explains the strange behavior observed in 2) and 3)