Hi,
I have a question and I apologize if it is too newbish. I have been for a while now trying to learn OpenGL but I cannot understand how its coordinate systems works. I know coordinate geometry as I did some math long ago as well as equations (linear, polynomial et al) which I think are enough to get me started with math of OGL. But I cannot get hold of how OGL maps its coordinates system with respect to the screen of the computer.
Google was of little help on this and any link/Explanation is warmly welcome and appreciated.
Thanks!

Game programming. Software Development --> Game Development.

Oooops!
Sorry, I didn't knew that was the right forum (don't remember to be there!)
If Mod will help me move it there I'll be grateful :(

Read this. It has very good explanation.

Thanks a lot. I'm reading it now:)

EDIT:
It is nut :(, are you kidding?

Edited 5 Years Ago by Stefano Mtangoo: mr nut site!

Thanks a lot. I'm reading it now:)

EDIT:
It is nut :(, are you kidding?

I'm at my internship right now, so when I'm home I'll try to explain it to you. Yes it helps if you know linear algebra already, so read up on that first, specifically about matrices and vectors. Then re-read that link. I'm sure in the time being, someone else will help you. Good Luck.

>>But I cannot get hold of how OGL maps its coordinates system with respect to the screen of the computer.

This is done via something called the Projection Matrix. It is quite a simple transformation from 3D cartesian coordinates to a 3D projective geometry (which produces 2D screen coordinates and 1 depth-value). The x-y coordinates are used to place the pixels on the screen and the depth value is tested against the pixel that is already there (see glDepthTest) to determine if that new pixel should be drawn or not.

For the 3D cartesian transformations, they are obtained via homogeneous transformation matrices (well.. the projection matrix is also a homogeneous transformation matrix). The matrix that does that is called the ModelView Matrix. To understand the transformations, the main thing is to understand 3D rotations (which is not as trivial as it looks).

Thanks everybody. Let me digets the explanations and linked articles.
I will be back in case of question or anything I fail to understand.
Again, thanks a lot :)

This article has been dead for over six months. Start a new discussion instead.