What makes OpenGL right handed?

Started by
62 comments, last by szecs 14 years ago
Quote:Original post by jyk
Quote:Original post by szecs
Maybe I will tell a totally dumb thing, but I'm a bit tired.
I think that makes openGL right-handed, is that if you don't apply any transformations (identity as model-view and projection), a model made and viewed in a left handed editor would appear mirrored in onenGL in the said conditions.

Some one please clarify this.
I don't think that's right; if the projection matrix is identity, I don't think the visual output will be anything meaningful (in the general case, at least).
Most newbies don't even know about the projection matrix.
So the question still sands: Am I right in my previous post?
Advertisement
Quote:Original post by szecs
So the question still sands: Am I right in my previous post?


You are, you won't see much because a pixel would take the whole screen (see swiftcoder's post), but that doesn't mean the model isn't there, in a right handed coordinate system [smile].
Does that mean I have solved the problem?
Do I get promoted or something?

(BTW if the model is smaller than 1.0 unit, then it will shown nicely, the viewport (thus pixels) has nothing to do with the matrices.)
Well, actually I think you can also switch handedness by providing a higher value for the left parameter than the right parameter OR higher for bottom than top for glFrustum or glOrtho, still, it would default to right handed.

Quote:Original post by szecs
(BTW if the model is smaller than 1.0 unit, then it will shown nicely, the viewport (thus pixels) has nothing to do with the matrices.)


Yeah, you're right.
Quote:Original post by Kwizatz
Quote:Original post by jyk
I said this same thing in another recent thread, but as far as I can tell, Direct3D/DirectX is no more left-handed than it is right-handed.


You may be thinking about row mayor vs column mayor notation
Nope, I'm thinking about handedness.

Also, there's no such thing as 'row-major notation', at least as far as I'm aware. Are you talking about row- vs. column-vector notation?
Quote:Original post by swiftcoder
An identity projection matrix is just an unscaled orthographic projection.
You're right, it is. But, if I'm not mistaken, it's a left-handed orthographic projection, so I'm not sure that szecs's theory holds up.
It's not the right or left handedness that is important, the important thing is that it is defined. If you have a coordinate in a right-handed coordinate system, the same coordinates will mean the point (represented by the coordinates) will be mirrored to on of the planes, in a left-handed CS. So you can define the handedness.

BTW the identity projection is same-handed as the identity modelview AFAIK. (I played around with shadow mapping matrices, and it didn't matter, if everything is applied in modelview (and the projection was identity), or the opposite, but I may remember wrong(ly?)).

Please correct my grammar.
Quote:Original post by jyk
Nope, I'm thinking about handedness.


fair enough.

Quote:Original post by jyk
Also, there's no such thing as 'row-major notation', at least as far as I'm aware. Are you talking about row- vs. column-vector notation?


I think there is, the way I understand it it has to do with whether the i and j in matrix notation Aij represent a column or a row, probably the same thing you mean with vector, but I could be wrong.
Quote:Original post by jyk
Quote:Original post by swiftcoder
An identity projection matrix is just an unscaled orthographic projection.
You're right, it is. But, if I'm not mistaken, it's a left-handed orthographic projection, so I'm not sure that szecs's theory holds up.


I think you are mistaken, what part exactly of a matrix tells you which handedness it belongs to? the 1,0,0 vector could point in the right direction just as well as it could to the left (or up, down,forward,backward for that matter).
Quote:I think there is, the way I understand it it has to do with whether the i and j in matrix notation Aij represent a column or a row, probably the same thing you mean with vector, but I could be wrong.
Matrix majorness and vector notation are two different things. 'Majorness' refers to the i and j thing you mentioned, while vector notation convention deals with whether vectors are represented as column matrices (Nx1) or row matrices (1xN).

I've never heard the phrase 'row-major notation' used, and to me at least, matrix majorness doesn't really seem like a notational issue (rather, it's a programming detail having to do with how things are represented in memory). But, I suppose it's just semantics.

In any case, there are (at least) three different issues at play here - coordinate system handedness, matrix majorness, and vector notation. They're often conflated with one another, but despite the fact that they're interrelated in some ways, they're essentially orthogonal.

This topic is closed to new replies.

Advertisement