From: Olivier G. <gal...@po...> - 2010-03-02 09:00:39
|
On Mon, Mar 01, 2010 at 08:22:37PM -0800, asimov01 wrote: > I am trying to implement the openGL Readpixels for depth buffer in plain > c++. I have tried to dig into openGL for this but I think this is protected > and I think its done in hardware. I tried to look in mesa but can't seem to > track it down. If anyone knows which file the mesa code is in please point > me in the right direction, I would really appreciate it. I just need to see > how mesa deals with this. Mesa includes both software and hardware renderers. For software, the readpixels implementation is in mesa/src/mesa/swrast/s_readpix.c and eventually calls read_depth_pixels. For hardware support it varies, grep for ReadPixels in mesa/src/mesa/drivers/dri/*/*.c > I am actually also trying to find glViewPort implementation. I have the > math that goes with it but again want to see how mesa has implemented it. mesa/src/main/viewport.c is probably what you're interested in. OG. |