Advertisement
Guest User

Untitled

a guest
May 28th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public void drawTexturedRectangle(double x, double y, double width, double height, double zIndex, String texture){
  2. textureManager.bindTexture(new ResourceLocation(WAIH.MODID, texture));
  3. vertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
  4. vertexBuffer.color(1.0f, 1.0f, 1.0f, .75f);
  5. vertexBuffer.pos(x - width/2, y - height/2, zIndex).endVertex();
  6. vertexBuffer.pos(x - width/2, y + height/2, zIndex).endVertex();
  7. vertexBuffer.pos(x + width/2, y + height/2, zIndex).endVertex();
  8. vertexBuffer.pos(x + width/2, y - height/2, zIndex).endVertex();
  9. tessellator.draw();
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement