Archived

This topic is now archived and is closed to further replies.

ID3DXSprite and rotations

This topic is 5130 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Since the summer update, ID3DXSprite no longer has a convenient way to rotate. You have to do it by supplying a transform matrix. My problem is that I can''t get this to work right. Not sure how it works in relation to the parameters (2D coordinates) you pass in to the Draw() method. It seems to me that the transform matrix supercedes the position parameter... or does it? I tried setting the transform to a matrix given to me by D3DXMatrixRotationZ(radians), but it only rotates by about a quarter circle (pi/2) instead of all the way around (2pi). It also rotated about 0,0 but I think I can fix that. Basically, if someone has gotten rotation to work properly with ID3DXSprite (from 9.0b SDK) I would like to know how.

Share this post


Link to post
Share on other sites
Umm, how would you do that? I don't see any different versions of it - it's just ID3DXSprite. You create an instance using D3DXCreateSprite(...) which again has no version information to go along with it. In fact, none of the D3DX interfaces have versions, as far as I can tell.

Unless I'm really missing something, the only way I can see to do that is to hack my way around the headers so that the ID3DXSprite class definition is read from d3dx8core.h instead of d3dx9core.h and to do other funky stuff. Which would be opening a can of worms. In fact, I'm [happily] using ID3DXFont from 9.0b and it's declared in the same file as the other D3DX extensions, so no amount of tampering will allow me to use an interface from 8 and another from 9...

[edited by - foofightr on November 30, 2003 3:46:25 AM]

Share this post


Link to post
Share on other sites