We have two options in triangle winding direction,
Anyway converting between them could take some cost. I want to avoid conversion as much as possible, and to do that, I need to know de facto standard of winding direction. I think there's one because many big corporations are using OpenGL, and I think if there's one direction which is used by most of them, that's de facto standard.
If there's no such thing, please let me know.
This is determined by the winding order of the triangle. Given an ordering of the triangle's three vertices, a triangle can appear to have a clockwise winding or counter-clockwise winding. Clockwise means that the three vertices, in order, rotate clockwise around the triangle's center.
Basically, your reasoning is slightly off when you say that OpenGL uses counter-clockwise by default. But for what? It is to determine what polygons are front - facing so that the polygons not visible are culled (not rendered).
The order of a triangle's vertices are used to determine which side of a triangle is the front side. If you are looking at a triangle and the order of the vertices is counter-clockwise, then, by convention, you are looking at the front of the triangle. The order of a triangle's vertices is called the winding order.
Winding can be either clockwise (CW) or counter-clockwise (anti-clockwise) (CCW), referring to the direction in which we pass through the vertices while looking down at the coordinate plane. In figure 1, the vertices of a polygon are listed with CW winding on the left and CCW winding on the right.
The OpenGL Programming guide says "By convention, polygons whose vertices appear in counterclockwise order on the screen are called front-facing."
The documentation on glFrontFace
says that the default is GL_CCW
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With