@Bortels, c is in the same units as a and b — that is, a and b aren’t strictly “pixels,” It’s just the way the default orthographic projection is set up. That is.
ortho( 0, WIDTH, 0, HEIGHT, -1, 1)
To understand clipping planes, imagine that the ortho() function creates a cube around your scene. The cube’s lowest extremity is 0,0,-1 and its farthest is WIDTH,HEIGHT,1. Anything that falls outside of the cube won’t be rendered, it will be “clipped” by the GPU. By default the near and far clipping planes do not provide much depth, you can change them, though.
It sounds like your 3D volumes are exceeding the clipping planes. Extend them in order to encompass your scene.
So, if you created a DEPTH value set to an arbitrary value, say 1000, you could do
ortho(0,0,0,WIDTH,HEIGHT,DEPTH)
And have a system where the “back” of the world was at 0 and the “front” at 1000?
I confess, I’ve left the 3D projections alone not because I don’t find them neat, but because I find the examples confusing… and I generaly grok both geometry and programming fairly well.
That’s correct, though the arguments to ortho are in this order: ortho( left, right, bottom, top, near, far)
Generally since everything is drawn at z=0 by default, you’d want your orthographic projection to heave a near plane of -depth and a far plane of depth.
With perspective projection the near plane must be greater than zero.