   Copy Surface to Texture
  helloi have a big problem that even msdn forumcouldnt help mei use directx 8.1sdk and i simply need tocopy my backbuffer to an textureto use it for nice ingame effectshere i have a little piece of my code,please help me what to do,i cant find any tutorial to do this thing,i am able to useD3DXSaveSurfaceToFileAto make screenshots of my game,so i cant belive thatit is a big thing just for copy one time persecond the backbuffer surface to an texture,i simply dont know what to write or what i forgotto domuch thx for any help //..........//here we are in my texture creation (only for showing...)// g_ppTexsky : this is my TARGET textureint dwWidth   =512;int dwHeight  =512;  hr = g_pd3dDevice->CreateTexture( dwWidth, dwHeight, 1,    0 ,    D3DFMT_A8R8G8B8, D3DPOOL_MANAGED,    &g_ppTexsky );//..........and here we go......//............................void CopyBackbufferToTextureAndUseitInMyGameLikeANormalTexture(void){int dwWidth=512;int dwHeight=512;//not working version 142.233.122aLPDIRECT3DSURFACE8 pBackBuffer, pZBuffer,texx;//I think with this i get surface of my sourceg_pd3dDevice->GetRenderTarget( &pBackBuffer );g_pd3dDevice->GetDepthStencilSurface( &pZBuffer );//This give me the surface of my target texture i thinkg_ppTexsky->GetSurfaceLevel(0,&texx);//with this i lock my texture (the target)D3DLOCKED_RECT d3dlr;g_ppTexsky->LockRect( 0,&d3dlr, 0, 0 ) ;//a nive one i tryed 2 days ago (it really looks like it can be work)D3DXLoadSurfaceFromSurface(texx,0,0,pBackBuffer ,0,0,D3DX_DEFAULT,0);/*this i try bevor....everytime with the same result ===Nothing happendsg_pd3dDevice->CopyRects(pBackBuffer,0,0,texx,0);*///Unlockg_ppTexsky ->UnlockRect(0);pBackBuffer->UnlockRect();//And here i am happy when my texture (remember g_ppTexsky) looks like  the picture in the backbuffer  (with resolution of 512x512)  return;}  