Thanks very much for replying, Brian
    I'm so sorry, My English is so poor that I can't even describe my
question clear.
    Here by "fetching pixels", I didn't mean the function invoked when using
"glReadPixels" explicitly in the application, I don't have a "glReadPixels"
call  in my application code.
    I mean, when the pipelines have finished rasterizing the vertices and
store the pixels into the framebuffer, all the data are in the memory,
nothing is displayed on the screen, my question is which function is invoked
to display those pixels on the screen so that we can see.
    I don't know whether I've show my problem clear or not. I just want to
learn how OpenGL interact with the graphics card and the Operating system
through this great work (Mesa) you've done.
    Thanks again. 
    
    -----Original Message-----
  From: Brian Paul [mailto:[EMAIL PROTECTED] 
  Sent: 2006?10?28? 23:30
  To: xiaoshuxing
  Cc: mesa3d-dev@lists.sourceforge.net
  Subject: Re: [Mesa3d-dev] when does mesa read pixels from the color
buffer?
    
    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