fork download
  1. unsigned index = quadsBatched;
  2. unsigned vboBaseIndex = index * VERTICES_PER_QUAD;
  3. const IntRect& textureRect = texture.rect;
  4.  
  5. mappedVbo[vboBaseIndex] = {rect.topLeft, textureRect.topLeft, {}};
  6. mappedVbo[vboBaseIndex + 1] = {rect.bottomLeft(), textureRect.bottomLeft(), {}};
  7. mappedVbo[vboBaseIndex + 2] = {rect.topRight(), textureRect.topRight(), {}};
  8. mappedVbo[vboBaseIndex + 3] = {rect.bottomRight, textureRect.bottomRight, {}};
  9.  
  10. unsigned iboBaseIndex = index * INDICES_PER_QUAD;
  11. mappedIbo[iboBaseIndex] = vboBaseIndex;
  12. mappedIbo[iboBaseIndex + 1] = vboBaseIndex + 1;
  13. mappedIbo[iboBaseIndex + 2] = vboBaseIndex + 2;
  14. mappedIbo[iboBaseIndex + 3] = vboBaseIndex + 2;
  15. mappedIbo[iboBaseIndex + 4] = vboBaseIndex + 1;
  16. mappedIbo[iboBaseIndex + 5] = vboBaseIndex + 3;
  17.  
  18. ++quadsBatched;
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty