Now I can get backbuffer pointer called pBackBuffer by
m_pDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO,
IREF_GETPPTR(pBackBuffer,IDirect3DSurface9));
And then create a surface called pSurfTemp in syetem memory by
m_pDevice->CreateOffscreenPlainSurface(
g_Proc.m_Stats.m_SizeWnd.cx, g_Proc.m_Stats.m_SizeWnd.cy,
s_bbFormat, D3DPOOL_SYSTEMMEM,
IREF_GETPPTR(pSurfTemp,IDirect3DSurface9), NULL );
Then I get the back buffer data by
m_pDevice->GetRenderTargetData(pBackBuffer, pSurfTemp);
Data seems transforming like this: videoMemory->systemMemory
Since next step is to operate the data in video memory again, it will copy it from system memory back into video memory. It wastes time.
I want to copy the data inside video memory, How can I do it?