Sign in to follow this  

D3DXSprite and SceneGraphs

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

This topic is 4780 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this