Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Estauns

Batching Quads : Rotations?

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

When you go to batch a bunch of quads (for 2D sprites), is there a way to still do rotations on the individual level? Or are you stuck batching by state, then texture, then rotation? If theres a way, please let me know.

Share this post


Link to post
Share on other sites
Advertisement
I doubt that you could handle rotations on an individual level if you were batch rendering them, since in order to do different transformations, you must:
(1) Build transformation matrix, set it
(2) Render that object
and then repeat for each separate object.

So, you are stuck batching by state, then texture, then rotation. I hope I understood your question correctly


Dustin Franklin
Mircrosoft DirectX MVP

Share this post


Link to post
Share on other sites
You can do the rotations yourself before adding the quads to a batch. Also make a lookup table for sin/cos to speed up calculations.

Share this post


Link to post
Share on other sites

  • 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!