Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the call
- s.render((x - (float)(xx - Math.floor(xx))) * 32f * Controller.scale, (y - (float)(yy - Math.floor(yy))) * 32f * Controller.scale, 0, Controller.scale);
- // code being called
- public void render(float xOffs, float yOffs, float angle, float scale) {
- if (scale != this.scale) {
- width = ow * scale;
- height = oh * scale;
- this.scale = scale;
- }
- tex.bind();
- glPushMatrix();
- glTranslatef(xOffs, yOffs, 0f);
- glRotatef(angle, 0f, 0f, 1f);
- glTranslatef(-width/2, -height/2, 0f);
- glScalef(scale, scale, 1);
- Utils.renderBuffer(vboVertexHandle, vboTexCoordHandle, 4);
- glPopMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement