Original Post
Hi, For our game, I sometimes need to show a progress bar when content is downloaded. I want to do this without continuously rendering the background, but by just taking a screenshot of the window and using that as a background for the progress-bar rendering cyclus. This is only necessary for full-screen as there is swapping. In windowed mode, I can just draw over the last rendered frame without clearing the backbuffer. So I: ... m_pD3DDevice->CreateTexture(resx,resy,1,0,D3DFMT_A8R8G8B8,D3DPOOL_MANAGED,&m_texBBCopy,NULL); ... ... IDirect3DSurface9 *srfBBCopy; IDirect3DSurface9 *srfBackBuffer; if (FAILED(hr=m_texBBCopy->GetSurfaceLevel(0,&srfBBCopy))) throw DException(hr,"RenderProgress - Failed to GetSurfaceLevel"); if (FAILED(hr=m_pD3DDevice->GetFrontBufferData(0,srfBBCopy))) throw DException(hr,"Failed to GetFrontBufferData"); // Repeat this for backbuffer-count if (FAILED(hr=m_pD3DDevice->GetBackBuffer(0,ibb,D3DBACKBUFFER_TYPE_MONO,&srfBackBuffer))) throw DException(hr,"RenderProgress - Failed to GetBackBuffer 0"); if (FAILED(hr=m_pD3DDevice->UpdateSurface(srfBBCopy,NULL,srfBackBuffer,NULL))) throw DException(hr,"RenderProgress - Failed to UpdateSurface 0"); // End repeat srfBackBuffer->Release(); srfBBCopy->Release(); Now, the code fails on GetFrontBufferData with the cryptic error: D3DERR_INVALIDCALL Can anyone tell me what I'm doing wrong?