View Full Version : glReadPixels speed

06-21-2004, 10:55 AM

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 :rolleyes: .
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 :confused: :confused: and sorry to be a little OT ;)

06-22-2004, 01:16 AM
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.