Question about D3DXSprite
For the Draw method, where do you specify the dest rect? I''m guessing it''s pTranslation, but I''m not sure.
The docs really suck for this interface. This is the definition for pTranslation; "Pointer to a D3DXVECTOR2 structure, representing the translation. If this argument is NULL, it is treated as identity"
It is the position of the top left hand corner of the sprite relative to the top left hand corner of the window (or screen if in full screen mode).
I understand that, but how do I move the sprite around the screen? Let''s say I want to place a texture at position 100,100 of the screen, how would I do that using the Draw method?
D3DXVECTOR2 pTranslation;
pTranslation.x = 100;
pTranslation.y = 100;
sprite->Draw( ....... pTranslation...);
pTranslation should be the 6th parameter .
hope this helps..
pTranslation.x = 100;
pTranslation.y = 100;
sprite->Draw( ....... pTranslation...);
pTranslation should be the 6th parameter .
hope this helps..
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement