I have been using opengl for a while and have been used to knowing that opengl uses a right hand coordinate system, I have recently started looking at vulkan too and found out there were some differences in the coordinate systems between the two rendering methods. Because of this I decided to do a deep dive in to what happens from the defining of a point to it being draw on the screen and while doing this I have seen some confusion in my previous understanding.
This brings me to my two questions
- when I have done my mvp transformation I have transformed my vertex in to clip space. From the information I can find the coordinate system of clip space (opengl) is y up positive, X right positive, z in to screen positive. This seems to be a left handed coordinate system not a right handed coordinate system.
Why is opengl defined as a right handed coordinate system when it looks to be left handed? The coordinate system of the underlying data is irrelevant to opengl because the first it really gets to see it is post projection calculations (which is not defined in opengl itself) and post projection is clip space.
- my understanding (right or wrong) is that clip space is where opengl does the culling (using the w coordinate). If my understanding is correct, why is there a further transformation needed in the z direction when converting to window coordinates? Opengl transforms (-1,1) to (0,1).
What operations are further being done in window space that haven’t already been done from a depth perspective and why couldn’t they be done in clip space?