   ID3DXSPRITE Performance Problem.
  Hi People,I'm using the ID3DXSprite to render textures. I got two texture that one of them is my character and the other one is my background. Background is 240x160 and i use D3DXMatrixScaling to make it get entire screen. When i do that there is a great performance decrease. I've controled my code a lot but could not find any way to solve that. I'll paste my code here so you could check it. Thanks...void Render(Sprite** SpriteArray){pD3DDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255,255,255,255), 1.0f, 0 );pD3DDevice->BeginScene();pSprt->Begin(D3DXSPRITE_ALPHABLEND);for(int i= 1; i>-1; --i){if(SpriteArray->fullscreen == 1){D3DXMatrixScaling(&m, (800/(float)(SpriteArray->width)), (600/(float)(SpriteArray->height)), 1);pSprt->SetTransform(&m);}else{D3DXMatrixScaling(&m,1, 1, 1);pSprt->SetTransform(&m);}pSprt->Draw(SpriteArray->pTexture, &SpriteArray->SrcRect, &SpriteArray->Center, &SpriteArray->Position, D3DCOLOR_ARGB(255,255,255,255) );}pSprt->End();pD3DDevice->EndScene();pD3DDevice->Present( NULL, NULL, NULL, NULL );}bool InitDirectX(HWND hWnd){pD3D = Direct3DCreate9(D3D_SDK_VERSION);if(!pD3D)return false;D3DPRESENT_PARAMETERS D3Dpp;ZeroMemory(&D3Dpp,sizeof(D3DPRESENT_PARAMETERS));D3Dpp.Windowed    = FALSE;D3Dpp.SwapEffect  = D3DSWAPEFFECT_DISCARD;D3Dpp.BackBufferFormat = D3DFMT_A8R8G8B8;D3Dpp.BackBufferHeight = HEIGHT;D3Dpp.BackBufferWidth  = WIDTH;D3Dpp.hDeviceWindow    = hWnd;if(FAILED(pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_REF, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &D3Dpp, &pD3DDevice)) )return false;D3DXCreateSprite(pD3DDevice, &pSprt);return true;}
  How big is "great"?Specifically, what's the framerate before and after?   ;  I add to what the previous poster that the FPS is not linear so be careful and compare only between ms time.Anyway even using a personal highly optimized sprite class you should get only 5/10% increase in speed so there is almost nothing you can do to change this.Please tell us GPU and stats so we can say what's causing this.   ;  I wouldn't transform the sprite every frame for starters. I would simply have the transformation done whenever fullscreen setting is changed. That will help, but I really don't know what the cost of the transformation is.   