I'm learning OpenGL and having a hard time finding a clear definition of the coordinate system.
How can you tell what numeric range of values will show up in the viewport?
-1.0 to +1.0 (after all transformations are applied).
This information is buried in the glViewport
documentation in a somewhat roundabout way. I'm choosing the MSDN version of the documentation because more other online sources mangle the formula during conversion to HTML (it's the correct formulat, but not recognizable).
You can get any pre-transformation coordinate system you want by applying appropriate scaling and translation factors. glOrtho
makes this easy in GL 1.x - 2.x. In OpenGL 3.x, you use a vertex shader to do transformations.