Render to Texture
bool CopyTexture(LPDIRECT3DDEVICE9 pDevice, LPDIRECT3DTEXTURE9 pDestTex, RECT* pDestRect, LPDIRECT3DTEXTURE9 pSrcTex, RECT* pSrcRect) { if (!pDevice || !pDestTex || !pSrcTex) return false; // Get Surface LPDIRECT3DSURFACE9 pSrcSurf, pDestSurf; if (FAILED(pSrcTex->GetSurfaceLevel(0, &pSrcSurf))) return false; if (FAILED(pDestTex->GetSurfaceLevel(0, &pDestSurf))) return false; pSrcTex->Release(); ..