Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: glReadPixel with video memory

  1. #1
    Member Regular Contributor
    Join Date
    Jun 2000
    Location
    B.C., Canada
    Posts
    397

    glReadPixel with video memory

    Just a hypothetical question here.

    Video memory that you allocate using the memory allocation function from the NV_vertex_array_range extension does not have to be used for a vertex array, right?

    So what would happen if you used the glReadPixels and glDrawPixels functions with a pointer to memory allocated this way?

    Would it be faster because the image data does not need to cross the bus between the GPU and the CPU?

    Or would it do that anyway and be slower?

    j

  2. #2
    Senior Member OpenGL Pro cass's Avatar
    Join Date
    Feb 2000
    Location
    Austin, TX, USA
    Posts
    1,058

    Re: glReadPixel with video memory

    j,

    There is currently no extension to accelerate pixel transfer operations in the way that VAR accelerates vertex transfer, but this may change in a future driver release.

    Thanks -
    Cass
    Cass Everitt -- cass@xyzw.us

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Sep 2000
    Location
    Santa Clara, CA
    Posts
    1,463

    Re: glReadPixel with video memory

    There is one exception to this rule that is worth noting. If you want to read back, say, GL_UNSIGNED_BYTE GL_RGBA color data and then _use_ it as vertex colors, then go right ahead and give us a pointer to your VAR, then set up your ColorPointer appropriately.

    This will not eliminate any work on our part, but you can avoid a second data copy by having us write the readback data directly into the VAR rather than into a temporary buffer that you copy into your VAR.

    This could be useful for techniques like Cass's ReadPixels-then-draw-lots-of-points per-pixel reflection demo.

    Aside from that, not too useful.

    - Matt

  4. #4
    Member Regular Contributor
    Join Date
    Jun 2000
    Location
    B.C., Canada
    Posts
    397

    Re: glReadPixel with video memory

    Thanks for the responses.

    I was wondering how that per-pixel bump mapping demo worked.

    j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •