Jump to content
  • Advertisement

Archived

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

johan_swe

How to use the new ID3DXSprite

This topic is 5467 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

I have installed the DX Summer Update, but ID3DXSprite doesn''t work. The code: m_pD3DXSprite->Begin(D3DXSPRITE_ALPHABLEND); m_pD3DXSprite->Draw(m_pTexture, NULL, &D3DXVECTOR3(m_Center.x, 0.0f, m_Center.y), &D3DXVECTOR3(m_Pos.x, 0.0f, m_Pos.y), 0xFFFFFFFF); m_pD3DXSprite->End(); It'' meanth to work just like the old ID3DXSprite interface, but it doesn''t render anything. All other DX-code (vbuffers, CD3DFont etc) works fine, just like before.

Share this post


Link to post
Share on other sites
Advertisement
Not that this is what's wrong, but a D3DXVECTOR3 is x,y,z... it appears you are using it as x,z,y, and maybe it has something to do with what you are setting the z-value to...

I also just leave 'center' as a NULL, and just set the position offset only.



------------------------------------------------------------
// TODO: Insert clever comment here.

[edited by - drowner on October 7, 2003 12:30:19 PM]

Share this post


Link to post
Share on other sites
I think you are right. Stupid mistake, of course it should be
m_pD3DXSprite->Draw(m_pTexture, NULL, &D3DXVECTOR3(m_Center.x, m_Center.y, 0.0f), &D3DXVECTOR3(m_Pos.x, m_Pos.y, 0.0f), 0xFFFFFFFF);

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!