Hi folks,

The current ES 2.0 standard says in corrolary 7: “The GL does not force left- or right-handedness on any of its coordinate systems”

What does this mean? An implementation can’t help choosing left or right handed-ness. If that seems debatable, just make a tetrahedron with opaque faces and a blue peak pointing towards +ve z. Render it with no transforms at all but depth filtering, and either you see blue or you don’t.

On my HTC Desire, I don’t see blue, which (having used other colours to confirm that x is rightwards and y is towards the top of the screen) makes it a left handed coordinate system. This was a great surprise for me because all over the web it says that OpenGL is right handed.

So what’s the deal with ES 2.0? Is this a bug in my phone or are they allowed to do this under the spec?

It would seem completely mad if every implementation was allowed to flip a coin over the handedness. That would make it impossible to write software that looked the same everywhere. But that corollary seems to mean just that.

Please explain.

By default clip space +X is right in screen space, +Y is up, and +Z is far, actually making clip space left-handed. While you cannot change the mapping direction of the first two (negative viewport width and height are not accepted), you can change the latter by selecting a different depth comparison (e.g. GL_GEQUAL instead of GL_LEQUAL).

In OpenGL versions with a matrix stack, glFrustum and glOrtho actually produce projection matrices that silently invert the Z axis, thus typically making the source space (“view space”) right-handed. But the user is able to change it.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.