Yes one method is to use Surface, however I would recommend this method
I am not sure how you have loaded bitmap, anyhow you can use bitmap as background in this way
//Make texture object LPDIRECT3DTEXTURE9 m_myBitmapTexture; // During Initialization, Load texture from file if(FAILED(D3DXCREATETEXTUREFROMFILE(device,"filepath\\file.bmp", 0, 0, 0, D3DMFT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFULT, D3DX_DEFAULT, 0x00000000, NULL, NULL, *m_myBitmapTexture))) return E_FAIL; // During Rendering, set texture device->SetTexture(0, m_myBitmapTexture); device->SetStreamSource(0, yourBuffer, 0, size(YourBufferStruct)); device->SetFVF(yourTextureFVF); // Setting flexible vertex format device->DrawPrimitive(topologyType, startindex, totalIndex);
You just need to make sure, your buffer should have texture coordinates and your shader too
struct YourBufferStruct { D3DXVECTOR3 position; D3DXVECTOR2 textureCoord; } // Define your flexible vertex format, i am just adding position and texture, //well you can add color, normal whatever extra you want #define yourTextureFVF (D3DFVF_XYZ | D3DFVF_TEX1)
Now add texture coordinates to shader too
For more details you can consult this link https://msdn.microsoft.com/en-us/library/windows/desktop/bb153262(v=vs.85).aspx
SpriteBatchclass to render a texture loaded with theDDSTextureLoaderorWICTextureLoaderclasses. See the Sprites and textures lesson in particular.