How to set sprite source coordinates?
- by ChaosDev
I am creating own sprite drawer with DX11 on C++. Works fine but I dont know how to apply source rectangle to texture coordinates of rendering surface(for animation sprite sheets)
//source = (0,0,32,64); //RECT
D3DXVECTOR2 t0 = D3DXVECTOR2( 1.0f, 0.0f);
D3DXVECTOR2 t1 = D3DXVECTOR2( 1.0f, 1.0f);
D3DXVECTOR2 t2 =…