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 2 of 2

Thread: glReadPixels speed

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2004
    Posts
    3

    glReadPixels speed

    Hi,

    i am currently developing an application that needs to read from videomemory to save it as video. Normaly i am using OpenGL but in this case there was some basecode in Direct3D and it was faster to finish project by using D3D.

    Now the big Problem is to read the videobuffer. In OpenGL i can read it on my 3.2ghz/Radeon 9800Pro system with 190MB/s(1024X768 32bit) but in D3D it is just 10MB/s by locking buffer and read it from given videomem-addr .
    Is there any way to get this great performance from glReadPixels in Direct3D?

    Please help - i have searched since days the net and found nothing and sorry to be a little OT

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,527

    Re: glReadPixels speed

    Slightly off topic, eh?
    Locking buffers and doing memcopy is called linear addressing. Don't do this, it's not HW acelerated.
    You could just use a GDI BitBlt from video to system memory HDCs if the area is onscreen.
    There should also be DirectDraw blit function which should be equally fast (never used), but that's probably mutually exclusive with D3D, so look for a D3D blit function.

Posting Permissions

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