Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void drawTexturedRectangle(double x, double y, double width, double height, double zIndex, String texture){
- textureManager.bindTexture(new ResourceLocation(WAIH.MODID, texture));
- vertexBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
- vertexBuffer.pos(x - width/2, y - height/2, zIndex).tex(0, 0).color(1.0f, 1.0f, 1.0f, 0.75f).endVertex();
- vertexBuffer.pos(x - width/2, y + height/2, zIndex).tex(0, 1).color(1.0f, 1.0f, 1.0f, 0.75f).endVertex();
- vertexBuffer.pos(x + width/2, y + height/2, zIndex).tex(1, 1).color(1.0f, 1.0f, 1.0f, 0.75f).endVertex();
- vertexBuffer.pos(x + width/2, y - height/2, zIndex).tex(1, 0).color(1.0f, 1.0f, 1.0f, 0.75f).endVertex();
- tessellator.draw();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement