Original Post
Hi, I'm back again and a little confused as to why the DirectX function D3DXLoadSurfaceFromSurface is stalling the cpu when copying and converting the backbuffer surface to another surface. I'm using D3DXLoadSurfaceFromSurface with the D3DX_FILTER_BOX flag set in order to stretch and copy the backbuffer surface to another surface which is exactly half the width/height as the screensize. It all works fine and dandy but the actual call to this function is way to too slow. Is there anyway of optimizing this function or am I not using it correctly by using the backbuffer surface as the source ??? I obtain the backbuffer surface (800x600) via a call to: d3ddevice.GetBackBuffer(0,D3DBACKBUFFER_TYPE_MONO,d3dbackbuffer); I then create another surface (400x300) with a call to: d3ddevice.CreateImageSurface(400,300, D3DFMT_X8R8G8B8 ,d3dscreensurface); Finally I copy the backbuffer surface into the other surface: D3DXLoadSurfaceFromSurface(d3dscreensurface,nil,nil,d3dbackbuffer,nil,nil,D3DX_FILTER_BOX,0); I have done a little tweaking and testing and found that the D3DX_FILTER_BOX is the fastest convertor, but only when the destination surface is exactly half the dimensions of the source surface. Whilst googling I read somewhere that using the backbuffer surface as a source in this funtion would be slow as the cpu is reading from the video memory. Since I can only obtain a pointer reference to the backbuffer how can I access it any other way. How can I copy the backbuffer surface to system memory in order to improve the performance of the surface copy. Any suggestions anyone...... thanks all. [Edited by - Bedlamuk on October 9, 2005 11:10:18 PM]