   ID3DXSprite Image Stretching
  Sorry, this isn't in C++ its in delphi. But its really similar so you can reply in C++ and I'll convert it.So I created an image that is 800x600 and I want to render it over a screen that is 800x600. However, the image stretches all weird and doesn't render correctly.Also, I'm a bit outdated so this is Direct3D8.Creation:D3DXCreateTextureFromResourceEx(IDirect3DDevice8Object,hInstance,MainConsoleResourceName,0,0,0,0,D3DFMT_A8R8G8B8,D3DPOOL_MANAGED,D3DX_DEFAULT,D3DX_DEFAULT,D3DCOLOR_XRGB(0, 0, 0),@SrcInfo,nil,DxConsoleTexture);D3DXCreateSprite(IDirect3DDevice8Object,DxConsoleSprite);Render:DxConsoleSprite._Begin;DxWindowSprite.Draw(DxConsoleTexture,nil,nil,nil,0,nil,$F0FFFFFF);DxWindowSprite._End;nil=NULL, @=&Thank you in advance.   
D3DXCreateTextureFromResourceEx (And all the D3DXCreateTextureFrom* functions) will create the texture surface as a power of 2 size, since a lot of cards require that. That means that an 800x600 texture gets loaded as 1024x1024, stretched to fit (If you use D3DX_DEFAULT for the filter parameter).You should really be using power of 2 textures if you want your code to work on the majority of cards, which means cutting a 800x600 texture into smaller pieces (Of 256x256 or smaller), and loading and rendering them all as separate textures.Alternatively, if you know the card can do non-power-of-2 textures (Which means you've checked the D3DCAPS9 struct's TextureCaps field and found it doesn't have the D3DPTEXTURECAPS_POW2 bit set), then you can tell D3DX to load the texture as its original size by specifying D3DX_DEFAULT_NONPOW2 for the Width and Height parameters (Although, the docs don't say that for D3DXCreateTextureFromResourceEx, only for D3DXCreateTextureFromFileEx...).   