Sign in to follow this  
mess

D3DXSprite and SceneGraphs

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

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