Sign in to follow this  
hserver

Sceen capture is slow using GetFrontBuffer

Recommended Posts

Hi I want to capture my Directx8 screen and do some "Image Processing" on it . i'm using pDev->GetFrontBuffer(surf) to access screen pixels but this is quite slow , any idea to make it faster?

Share this post


Link to post
Share on other sites
You would need to use a pixel shader. Iterating over the entire image in the CPU is going take take way to long. If this is somehting thats got to run at 30 FPS it would be impossible on the CPU.

Share this post


Link to post
Share on other sites
You would need to use a pixel shader. Iterating over the entire image in the CPU is going take take way to long. If this is somehting thats got to run at 30 FPS it would be impossible on the CPU.

Share this post


Link to post
Share on other sites
Who is MR occlusion query !? :-)
i'm using directx8 and such this things are not invented yet!

i can get pixels of HMapTex like this :
Dim HMapTex As Direct3DTexture8
Dim lrData As D3DLOCKED_RECT
HMapTex.LockRect 0, lrData, ByVal 0, 0
DXCopyMemory pxArr2(0), ByVal lrData2.pBits, 262144
HMapTex.UnlockRect 0
I found the answer by myself
i have to get backBuffer instead of front buffer
and don't forget to set present flag to D3DPRESENTFLAG_LOCKABLE_BACKBUFFER
anyway Thanks my friends

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this