Hi all,
Im using 2d sprites, and I would like to copy a small rectangle which is in the middle of the big sprite, to another sprite sized as that rectangle.
I load my textures like this :
| 1 |
|
| 2 |
D3DXCreateSprite(StdGfx::GetD3DDev(),&spritedata.d3dfigurespt); |
| 3 |
D3DXCreateTextureFromFileEx(StdGfx::GetD3DDev(), // the device pointer |
| 4 |
bmpfilename, // the file name |
| 5 |
D3DX_DEFAULT, // default width |
| 6 |
D3DX_DEFAULT, // default height |
| 7 |
D3DX_DEFAULT, // no mip mapping |
| 8 |
NULL, // regular usage |
| 9 |
D3DFMT_A8R8G8B8, // 32-bit pixels with alpha |
| 10 |
D3DPOOL_MANAGED, // typical memory handling |
| 11 |
D3DX_DEFAULT, // no filtering |
| 12 |
D3DX_DEFAULT, // no mip filtering |
| 13 |
D3DCOLOR_XRGB(255, 0, 255),// the hot-pink color key |
| 14 |
NULL, // no image info struct |
| 15 |
NULL, // not using 256 colors |
| 16 |
&spritedata.figureanim); // load to sprite |
| 17 |
|
where spritedata.figureanim is of type LPDIRECT3DTEXTURE9 and spritedata.d3dfigurespt is of type LPD3DXSPRITE
Any help will be appreciated :)
Thanks