• Advertisement
Sign in to follow this  

modifying D3DXSPRITE batches

This topic is 4919 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 know you can add sprites to the render batch via the Draw() command, but what about removing them? My game just has a few object on the screen that need to be updated, the majority will remain the same. So I was thinking it would be more efficient to just add and remove a few sprites at a time than to have to flush and re-draw all my sprites every frame.

Share this post


Link to post
Share on other sites
Advertisement
If you are clearing the screen (or any of your sprites are moving) then you have to re-batch all the sprites. Unbatching only means removing a batched sprite that has been added in the SAME frame. Whenever you call sprite->End() it flushes the sprite batch anyway.
There's not much point to unbatching, it's like getting ready to draw then then not drawing, so if you want a sprite not drawn, just dont batch it in your engine's Render function. A batch doesnt extend across multiple calls to sprite->Begin(), and therefore across multiple frames.

Share this post


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

  • Advertisement