xiaoshuxing wrote:
> Hello. Everybody:
> 
> I’ve been reading the source code of mesa recently, and what puzzles me 
> a lot is that I can’t find the function to fetch pixels from the color 
> buffer when rendering to the screen.
> 
> I’ve set several breakpoints in the file 
> “s_span.c(_swrast_read_rgba_span,_swrast_get_values, _swrast_get_row)” 
> ,“wmesa.c(read_rgba_pixels(/spans)_32)”, which I thought have the most 
> possibility to be the right one, but none of them was hit when I was 
> running in the debug mode in Visual studio.net 2005.
> 
> So is there anybody who can give me a clue that which function may be 
> invoked when the application reads pixels from framebuffer and render it 
> to the screen.
> 
> any help will be appreciated.

One of several different paths may be taken to implement glReadPixels:

1. The driver might plug in a hardware-specific ReadPixels routine 
into ctx->Driver.ReadPixels().  I don't think the Windows driver does 
that.

2. The swrast module can try an optimized routine, like 
fast_read_rgba_pixels() (in s_readpix.c) for simple cases.

3. If neither of those is used, the swrast module will basically use 
_swrast_read_rgba_span() to read pixels a row at a time, before 
applying the pixel transfer operations.

If you stop your debugger in _mesa_ReadPixels() it should be easy to 
trace the path.

-Brian


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to