Results 1 to 2 of 2

Thread: Handedness

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    2

    Handedness

    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.
    Adrian.

  2. #2
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: Handedness

    Quote Originally Posted by adrianmay
    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.
    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.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •