I plan to use OpenGL to create gray bitmap height maps to drive my CNC machine.

I will use glOrtho() and depth buffer with float elements.

But I want the depth values change linear between near and far plane. Is there a guarantee about this?

After a little research I found that maybe the depth value change logarithmic and not linear.

Is there a specific (and standard) formula to convert z to depth value, OR z IS the depth value?

Special thanks