Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // the call
  2.  
  3. s.render((x - (float)(xx - Math.floor(xx))) * 32f * Controller.scale, (y - (float)(yy - Math.floor(yy))) * 32f * Controller.scale, 0, Controller.scale);
  4.  
  5. // code being called
  6.  
  7. public void render(float xOffs, float yOffs, float angle, float scale) {
  8.  
  9. if (scale != this.scale) {
  10. width = ow * scale;
  11. height = oh * scale;
  12.  
  13. this.scale = scale;
  14. }
  15.  
  16. tex.bind();
  17.  
  18. glPushMatrix();
  19. glTranslatef(xOffs, yOffs, 0f);
  20. glRotatef(angle, 0f, 0f, 1f);
  21. glTranslatef(-width/2, -height/2, 0f);
  22. glScalef(scale, scale, 1);
  23. Utils.renderBuffer(vboVertexHandle, vboTexCoordHandle, 4);
  24. glPopMatrix();
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement