Jump to content
  • Advertisement
Sign in to follow this  

did any one use ID3DXSprite in 3d space??

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

hi! i am creating 2d game with ID3DXSprite , but for giving zooming and 3d particle effects i wanted to use 3d space by initializing view projection and world matrix .....so i tried this but it doesnt working, and my world transformation not givig any effect over 2d ID3DXSprite ....is there anyway to communicate them as the way i want??? thanks

Share this post


Link to post
Share on other sites
Advertisement
Nope*. ID3DXSprite is designed to be 2D. It uses state blocks to make sure that all the render states it needs are set, and it used post-transformed vertices. You can use the SetTransform() method to change the scale of the sprite though.


* You could derive your own IDirect3DDevice9 class, and pass that to D3DXCreateSprite, and then do whatever is nessecary when the sprite draws itself (e.g. converting the sprites DrawPrimitive() into a DrawPrimitive() on the real device). However, I think that's just being silly :P

Share this post


Link to post
Share on other sites
IIRC, you can render sprites in object space (and you can billboard, too). To render in object space, call Begin() with D3DXSPRITE_OBJECTSPACE. To billboard sprites, call Begin() with D3DXSPRITE_BILLBOARD. If you want to enable billboarding, you have to call SetWorldView*H() first.

You can check out all of the available flags here, on MSDN.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!