As far as I know, glReadPixels is the only way to access the depth buffer…
I do not know what the algorithm you are using involves but what do you exactly do when reading the buffer ?
- Do you read the whole buffer at once and then work on it ?
- Do you read parts of the buffer several time ?
If you are doing 2), perhaps you should try to read the whole buffer only once as described in 1)… It should be faster than multiple “mini”-glReadPixels (on this one, nVidia guys will answer better than me !).
If you need to read it at different stages of your rendering process, then I guess you have to stick to multiple “mini”-reads…
Now, if you are already reading the whole buffer at once and it is too slow, I have no idea…
I don’t think switching to software mode would help: you do not have direct access to the depth buffer either if you use Microsoft GDI Generic implementation (although I am sure there is a dirty hack to find in this case !).