• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

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

 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!