• Post Reply Bookmark Topic Watch Topic
  • New Topic

Rotating individual elements within a Batch of Quads (Open GL ES 2.0)

 
Stephen Bell
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've written a quad class to construct and display the sprites for my Android game (Using OpenGL ES 2.0)

I am able to give each quad in the batch a different position, different texture and different size, however, the one thing that I've never been able work out is how I can rotate individual elements within the batch.

When drawing an individual quad I've written a method to enable me to rotate it and that works fine. It's only with batchess that I have the problem (if I apply my current rotation code, it rotates the whole batch which is obviously not what I'm after)

Following are the methods I use to draw my Batched Quads and rotate Single (not batched) Quads.

And help would be appreciated. Thanks

QuadBatch drawing method



Rotation method (works on individual quads only, not batches)

 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!