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.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to