• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

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)

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!