Jump to content
  • Advertisement
Sign in to follow this  
mess

D3DXSprite and SceneGraphs

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

Im currently using individual d3dxsprites in my scenegraph. My engine is running very slow when i introduce even a few sprite objects into my scene. I hear d3dxsprite is only fast when you batch them. Would you suggest I switched to pointsprites for a batched particle effect object and Quad sprites for individual sprite objects in my scenegraph? thanks.

Share this post


Link to post
Share on other sites
Advertisement
You should only have ONE ID3DXSprite per application. You should only have one, because like you mentioned, ID3DXSprite batches all of the textures together into one draw call (actually, not *all* of the textures, but the maximum amount that the graphics hardware permits). This makes it pretty fast.

Perhaps you want to have your Sprite class only contain the texture. Then, you could have a SpriteRenderer, which contains an ID3DXSprite interface, that would render a sprite object.

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.

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!