Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Ranch Hand
Posts: 49
  • 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)

I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!