View Full Version : Z-buffer

09-15-2005, 03:18 AM
I am using OpenGL's z-buffer for scientific caclulations. I want to emulate what OpenGL does in software, but the code I wrote is giving me different results with respect to the z-buffer values and the rasterized pixels on the edges of polygons. I know that its impossible to get the exact same values since OpenGL uses non linear accuracy and usually 24bits for the z-buffer, but does anyone know where can I find any specifications about OpenGL's rasterizer (for example how exactly does it do the rounding of floats to integers,the interpolation between z-values etc), or even better some code?

09-15-2005, 03:54 AM
have a look at mesa3d (http://www.mesa3d.org/) which implements opengl in software and comes with full source code.

09-15-2005, 03:56 AM
And there's the OpenGL sample implementation by SGI: