List of usage examples for org.lwjgl.opengl GL11 glTranslatef
public static native void glTranslatef(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z);
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelRendererWildAnimals.java
License:Open Source License
@SideOnly(Side.CLIENT) public void render(float par1) { if (!this.isHidden) { if (this.showModel) { if (!this.compiled) { this.compileDisplayList(par1); }/*w ww.java 2 s .c o m*/ GL11.glTranslatef(this.offsetX, this.offsetY, this.offsetZ); int i; if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) { if (this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F) { GL11.glCallList(this.displayList); if (this.childModels != null) { for (i = 0; i < this.childModels.size(); ++i) { ((ModelRendererWildAnimals) this.childModels.get(i)).render(par1); } } } else { GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); GL11.glCallList(this.displayList); if (this.childModels != null) { for (i = 0; i < this.childModels.size(); ++i) { ((ModelRendererWildAnimals) this.childModels.get(i)).render(par1); } } GL11.glTranslatef(-this.rotationPointX * par1, -this.rotationPointY * par1, -this.rotationPointZ * par1); } } else { GL11.glPushMatrix(); GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); if (this.rotateAngleZ != 0.0F) { GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); } if (this.rotateAngleY != 0.0F) { GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); } if (this.rotateAngleX != 0.0F) { GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); } GL11.glCallList(this.displayList); if (this.childModels != null) { for (i = 0; i < this.childModels.size(); ++i) { ((ModelRendererWildAnimals) this.childModels.get(i)).render(par1); } } GL11.glPopMatrix(); } GL11.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ); } } }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelRendererWildAnimals.java
License:Open Source License
@SideOnly(Side.CLIENT) public void renderWithRotation(float par1) { if (!this.isHidden) { if (this.showModel) { if (!this.compiled) { this.compileDisplayList(par1); }/*from www. j av a 2 s . c o m*/ GL11.glPushMatrix(); GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); if (this.rotateAngleY != 0.0F) { GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); } if (this.rotateAngleX != 0.0F) { GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); } if (this.rotateAngleZ != 0.0F) { GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); } GL11.glCallList(this.displayList); GL11.glPopMatrix(); } } }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelRendererWildAnimals.java
License:Open Source License
/** * Allows the changing of Angles after a box has been rendered *///w w w . j a v a 2s. co m @SideOnly(Side.CLIENT) public void postRender(float par1) { if (!this.isHidden) { if (this.showModel) { if (!this.compiled) { this.compileDisplayList(par1); } if (this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) { if (this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F) { GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); } } else { GL11.glTranslatef(this.rotationPointX * par1, this.rotationPointY * par1, this.rotationPointZ * par1); if (this.rotateAngleZ != 0.0F) { GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F); } if (this.rotateAngleY != 0.0F) { GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); } if (this.rotateAngleX != 0.0F) { GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F); } } } } }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelSeaHorse.java
License:Open Source License
public void renderSerpent(EntitySerpent parEntity, float parTime, float parSwingSuppress, float par4, float parHeadAngleY, float parHeadAngleX, float par7) { setRotationAngles(parTime, parSwingSuppress, par4, parHeadAngleY, parHeadAngleX, par7, parEntity); // scale the whole thing for big or small entities GL11.glPushMatrix();//from w w w . j a v a 2 s . c o m GL11.glScalef(parEntity.getScaleFactor(), parEntity.getScaleFactor(), parEntity.getScaleFactor()); if (this.isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, this.field_78145_g * par7, this.field_78151_h * par7); head.render(par7); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F); body1.render(par7); // all rest of body are children of body1 GL11.glPopMatrix(); } else { head.render(par7); body1.render(par7); // all rest of body are children of body1 } // don't forget to pop the matrix for overall scaling GL11.glPopMatrix(); }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelSerpent.java
License:Open Source License
public void renderSerpent(EntitySerpent parEntity, float parTime, float parSwingAmount, float par4, float parHeadAngleY, float parHeadAngleX, float par7) { setRotationAngles(parTime, parSwingAmount, par4, parHeadAngleY, parHeadAngleX, par7, parEntity); // scale the whole thing for big or small entities GL11.glPushMatrix();/*from ww w . j a va 2 s . c o m*/ GL11.glScalef(parEntity.getScaleFactor(), parEntity.getScaleFactor(), parEntity.getScaleFactor()); if (this.isChild) { float childScaleFactor = 0.5F; GL11.glPushMatrix(); GL11.glScalef(1.0F * childScaleFactor, 1.0F * childScaleFactor, 1.0F * childScaleFactor); GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F); head.render(par7); // flick tongue occasionally if (parEntity.ticksExisted % 60 == 0 && parSwingAmount <= 0.1F) { tongue.render(par7); } body1.render(par7); // all rest of body are children of body1 GL11.glPopMatrix(); } else { head.render(par7); // flick tongue occasionally if (parEntity.ticksExisted % 60 == 0 && parSwingAmount <= 0.1F) { tongue.render(par7); } body1.render(par7); // all rest of body are children of body1 } // don't forget to pop the matrix for overall scaling GL11.glPopMatrix(); }
From source file:com.blogspot.jabelarminecraft.wildanimals.renderers.RenderThrowableSpawnEgg.java
License:Open Source License
/** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. *///from ww w.j a v a 2s . c o m public void doRender(EntityWildAnimalsEgg parEntityWildAnimalsEgg, double parPosX, double parPosY, double parPosZ, float p_76986_8_, float parTweenFactor) { bindEntityTexture(parEntityWildAnimalsEgg); GL11.glPushMatrix(); GL11.glTranslatef((float) parPosX, (float) parPosY, (float) parPosZ); GL11.glRotatef(parEntityWildAnimalsEgg.prevRotationYaw + (parEntityWildAnimalsEgg.rotationYaw - parEntityWildAnimalsEgg.prevRotationYaw) * parTweenFactor - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(parEntityWildAnimalsEgg.prevRotationPitch + (parEntityWildAnimalsEgg.rotationPitch - parEntityWildAnimalsEgg.prevRotationPitch) * parTweenFactor, 0.0F, 0.0F, 1.0F); Tessellator tessellator = Tessellator.instance; byte b0 = 0; float f2 = 0.0F; float f3 = 0.5F; float f4 = 0.0F; float f5 = 5 / 32.0F; float f6 = 0.0F; float f7 = 0.15625F; float f8 = 5 / 32.0F; float f9 = 10 / 32.0F; float scaleFactor = 0.05625F; GL11.glEnable(GL12.GL_RESCALE_NORMAL); float f11 = -parTweenFactor; if (f11 > 0.0F) { float f12 = -MathHelper.sin(f11 * 3.0F) * f11; GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F); } GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F); GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); GL11.glTranslatef(-4.0F, 0.0F, 0.0F); GL11.glNormal3f(scaleFactor, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, f6, f8); tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, f7, f8); tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, f7, f9); tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, f6, f9); tessellator.draw(); GL11.glNormal3f(-scaleFactor, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, f6, f8); tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, f7, f8); tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, f7, f9); tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, f6, f9); tessellator.draw(); for (int i = 0; i < 4; ++i) { GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); GL11.glNormal3f(0.0F, 0.0F, scaleFactor); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, f2, f4); tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, f3, f4); tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, f3, f5); tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, f2, f5); tessellator.draw(); } GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); }
From source file:com.bluepowermod.client.render.RenderEngine.java
License:Open Source License
@SuppressWarnings("cast") @Override/*from w w w . j a v a 2 s . c o m*/ public void renderTileEntityAt(TileEntity engine, double x, double y, double z, float f) { if (engine instanceof TileEngine) { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); TileEngine tile = (TileEngine) engine.getWorldObj().getTileEntity(engine.xCoord, engine.yCoord, engine.zCoord); ForgeDirection direction = tile.getOrientation(); GL11.glTranslated(x, y, z); GL11.glScaled(.0315, .0315, .0315); if (direction == ForgeDirection.UP) { GL11.glTranslated(16, 28, 16); GL11.glRotatef(180, 1, 0, 0); } if (direction == ForgeDirection.DOWN) { GL11.glTranslated(16, 4, 16); GL11.glRotatef(0, 0, 0, 0); } if (direction == ForgeDirection.EAST) { GL11.glTranslated(28, 16, 16); GL11.glRotatef(90, 0, 0, 1); } if (direction == ForgeDirection.WEST) { GL11.glTranslated(4, 16, 16); GL11.glRotatef(90, 0, 0, -1); } if (direction == ForgeDirection.NORTH) { GL11.glTranslated(16, 16, 4); GL11.glRotatef(90, 1, 0, 0); } if (direction == ForgeDirection.SOUTH) { GL11.glTranslated(16, 16, 28); GL11.glRotatef(90, -1, 0, 0); } if (tile.isActive) { bindTexture(textureLocationOn); } else { bindTexture(textureLocationOff); } engineModel.renderAllExcept("gear", "glider"); if (tile.isActive) { f += tile.pumpTick; if (tile.pumpSpeed > 0) { f /= tile.pumpSpeed; } } else { f = 0; } f = (float) ((float) 6 * (.5 - .5 * Math.cos(3.1415926535897931D * (double) f))); GL11.glTranslatef(0, f, 0); engineModel.renderPart("glider"); GL11.glTranslatef(0, -f, 0); if (tile.isActive) { if (tile.getWorldObj().isRemote) { rotateAmount++; GL11.glRotated(tile.gearTick * 19, 0, 1.5707963267948966D * (double) f, 0); } } engineModel.renderPart("gear"); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } }
From source file:com.bluepowermod.client.render.RenderPartItem.java
License:Open Source License
private void render(float x, float y, float z, float scale, ItemRenderType type, ItemStack item, Object... data) {/*w w w. j av a2s . co m*/ boolean blend = GL11.glGetBoolean(GL11.GL_BLEND); boolean alpha = GL11.glGetBoolean(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glPushMatrix(); GL11.glScalef(scale, scale, scale); GL11.glTranslatef(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); try { BPPart part = PartManager.getExample(item); part.renderItem(type, item, data); } catch (Exception ex) { } GL11.glPopMatrix(); if (!blend) GL11.glDisable(GL11.GL_BLEND); if (!alpha) GL11.glDisable(GL11.GL_ALPHA_TEST); }
From source file:com.bluepowermod.part.tube.Accelerator.java
License:Open Source License
@Override @SideOnly(Side.CLIENT)//from ww w . ja v a 2 s.c o m public void renderDynamic(Vec3d loc, double delta, int pass) { super.renderDynamic(loc, delta, pass); if (pass == 0) { Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture); Tessellator t = Tessellator.instance; GL11.glPushMatrix(); GL11.glTranslatef((float) loc.getX() + 0.5F, (float) loc.getY() + 0.5F, (float) loc.getZ() + 0.5F); if (rotation == ForgeDirection.NORTH || rotation == ForgeDirection.SOUTH) { GL11.glRotated(90, 1, 0, 0); } else if (rotation == ForgeDirection.EAST || rotation == ForgeDirection.WEST) { GL11.glRotated(90, 0, 0, 1); } GL11.glTranslatef((float) -loc.getX() - 0.5F, (float) -loc.getY() - 0.5F, (float) -loc.getZ() - 0.5F); t.startDrawingQuads(); t.setColorOpaque_F(1, 1, 1); t.addTranslation((float) loc.getX(), (float) loc.getY(), (float) loc.getZ()); IIcon icon = isPowered() ? IconSupplier.acceleratorFrontPowered : IconSupplier.acceleratorFront; double minX = icon.getInterpolatedU(0); double maxX = icon.getInterpolatedU(16); double minY = icon.getInterpolatedV(0); double maxY = icon.getInterpolatedV(16); t.setNormal(0, -1, 0); t.addVertexWithUV(0, 4 / 16D, 0, maxX, maxY);// minY t.addVertexWithUV(1, 4 / 16D, 0, minX, maxY); t.addVertexWithUV(1, 4 / 16D, 1, minX, minY); t.addVertexWithUV(0, 4 / 16D, 1, maxX, minY); t.setNormal(0, 1, 1); t.addVertexWithUV(0, 12 / 16D, 0, maxX, maxY);// maxY t.addVertexWithUV(0, 12 / 16D, 1, minX, maxY); t.addVertexWithUV(1, 12 / 16D, 1, minX, minY); t.addVertexWithUV(1, 12 / 16D, 0, maxX, minY); icon = isPowered() ? IconSupplier.acceleratorSidePowered : IconSupplier.acceleratorSide; minX = icon.getInterpolatedU(4); maxX = icon.getInterpolatedU(12); minY = icon.getInterpolatedV(0); maxY = icon.getInterpolatedV(16); t.setNormal(0, 0, 1); t.addVertexWithUV(0, 4 / 16D, 1, maxX, minY);// maxZ t.addVertexWithUV(1, 4 / 16D, 1, maxX, maxY); t.addVertexWithUV(1, 12 / 16D, 1, minX, maxY); t.addVertexWithUV(0, 12 / 16D, 1, minX, minY); t.setNormal(0, 0, -1); t.addVertexWithUV(0, 4 / 16D, 0, minX, maxY);// minZ t.addVertexWithUV(0, 12 / 16D, 0, maxX, maxY); t.addVertexWithUV(1, 12 / 16D, 0, maxX, minY); t.addVertexWithUV(1, 4 / 16D, 0, minX, minY); t.setNormal(-1, 0, 0); t.addVertexWithUV(0, 4 / 16D, 0, maxX, minY);// minX t.addVertexWithUV(0, 4 / 16D, 1, maxX, maxY); t.addVertexWithUV(0, 12 / 16D, 1, minX, maxY); t.addVertexWithUV(0, 12 / 16D, 0, minX, minY); t.setNormal(1, 0, 0); t.addVertexWithUV(1, 4 / 16D, 0, maxX, maxY);// maxX t.addVertexWithUV(1, 12 / 16D, 0, minX, maxY); t.addVertexWithUV(1, 12 / 16D, 1, minX, minY); t.addVertexWithUV(1, 4 / 16D, 1, maxX, minY); icon = IconSupplier.acceleratorInside; minX = icon.getInterpolatedU(4); maxX = icon.getInterpolatedU(12); minY = icon.getInterpolatedV(4); maxY = icon.getInterpolatedV(12); t.addVertexWithUV(0, 4 / 16D, 6 / 16D, minX, minY);// inside maxZ t.addVertexWithUV(1, 4 / 16D, 6 / 16D, maxX, maxY); t.addVertexWithUV(1, 12 / 16D, 6 / 16D, maxX, maxY); t.addVertexWithUV(0, 12 / 16D, 6 / 16D, minX, minY); t.addVertexWithUV(0, 4 / 16D, 10 / 16D, minX, maxY);// inside minZ t.addVertexWithUV(0, 12 / 16D, 10 / 16D, minX, minY); t.addVertexWithUV(1, 12 / 16D, 10 / 16D, maxX, minY); t.addVertexWithUV(1, 4 / 16D, 10 / 16D, maxX, maxY); t.addVertexWithUV(10 / 16D, 4 / 16D, 0, minX, minY);// inside minX t.addVertexWithUV(10 / 16D, 4 / 16D, 1, maxX, maxY); t.addVertexWithUV(10 / 16D, 12 / 16D, 1, maxX, maxY); t.addVertexWithUV(10 / 16D, 12 / 16D, 0, minX, minY); t.addVertexWithUV(6 / 16D, 4 / 16D, 0, minX, minY);// inside maxX t.addVertexWithUV(6 / 16D, 12 / 16D, 0, minX, maxY); t.addVertexWithUV(6 / 16D, 12 / 16D, 1, maxX, maxY); t.addVertexWithUV(6 / 16D, 4 / 16D, 1, maxX, minY); t.addTranslation((float) -loc.getX(), (float) -loc.getY(), (float) -loc.getZ()); t.draw(); GL11.glPopMatrix(); } }
From source file:com.bluepowermod.part.tube.MagTube.java
License:Open Source License
/** * Render method that works, and now should be buried under the ground so no-one looks at it *///from www .j a v a 2 s . c o m @Override @SideOnly(Side.CLIENT) protected void renderSide() { Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture); Tessellator t = Tessellator.instance; GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0.5F, 0.5F); if (getParent() == null || getWorld() == null) { } else { if (connections[2]) { GL11.glRotated(90, 1, 0, 0); } else if (connections[4]) { GL11.glRotated(90, 0, 0, 1); } } GL11.glTranslatef(-0.5F, -0.5F, -0.5F); t.startDrawingQuads(); double min = 2 / 16D; double max = 14 / 16D; double inMin = 12.001 / 16D; double inMax = 3.999 / 16D; IIcon icon = IconSupplier.magCoilSide; double minX = icon.getInterpolatedU(min * 16); double maxX = icon.getInterpolatedU(max * 16); double minY = icon.getInterpolatedV(min * 16); double maxY = icon.getInterpolatedV(max * 16); t.setNormal(0, 0, 1); t.addVertexWithUV(min, min, max, maxX, maxY);// maxZ t.addVertexWithUV(max, min, max, minX, maxY); t.addVertexWithUV(max, max, max, minX, minY); t.addVertexWithUV(min, max, max, maxX, minY); t.addVertexWithUV(min, min, inMax, maxX, maxY);// inside maxZ t.addVertexWithUV(max, min, inMax, minX, maxY); t.addVertexWithUV(max, max, inMax, minX, minY); t.addVertexWithUV(min, max, inMax, maxX, minY); t.setNormal(0, 0, -1); t.addVertexWithUV(min, min, min, minX, maxY);// minZ t.addVertexWithUV(min, max, min, minX, minY); t.addVertexWithUV(max, max, min, maxX, minY); t.addVertexWithUV(max, min, min, maxX, maxY); t.addVertexWithUV(min, min, inMin, maxX, maxY);// inside minZ t.addVertexWithUV(min, max, inMin, minX, minY); t.addVertexWithUV(max, max, inMin, minX, minY); t.addVertexWithUV(max, min, inMin, maxX, maxY); t.setNormal(-1, 0, 0); t.addVertexWithUV(min, min, min, maxX, maxY);// minX t.addVertexWithUV(min, min, max, minX, maxY); t.addVertexWithUV(min, max, max, minX, minY); t.addVertexWithUV(min, max, min, maxX, minY); t.addVertexWithUV(inMin, min, min, maxX, maxY);// inside minX t.addVertexWithUV(inMin, min, max, minX, maxY); t.addVertexWithUV(inMin, max, max, minX, minY); t.addVertexWithUV(inMin, max, min, maxX, minY); t.setNormal(1, 0, 0); t.addVertexWithUV(max, min, min, minX, minY);// maxX t.addVertexWithUV(max, max, min, minX, maxY); t.addVertexWithUV(max, max, max, maxX, maxY); t.addVertexWithUV(max, min, max, maxX, minY); t.addVertexWithUV(inMax, min, min, maxX, minY);// maxX t.addVertexWithUV(inMax, max, min, minX, maxY); t.addVertexWithUV(inMax, max, max, minX, maxY); t.addVertexWithUV(inMax, min, max, maxX, minY); icon = IconSupplier.magCoilFront; minX = icon.getInterpolatedU(min * 16); maxX = icon.getInterpolatedU(max * 16); minY = icon.getInterpolatedV(min * 16); maxY = icon.getInterpolatedV(max * 16); for (int i = 2; i < 16; i += 8) { t.setNormal(0, 1, 0); t.addVertexWithUV(min, 1 - i / 16D, min, maxX, maxY);// maxY t.addVertexWithUV(min, 1 - i / 16D, max, minX, maxY); t.addVertexWithUV(max, 1 - i / 16D, max, minX, minY); t.addVertexWithUV(max, 1 - i / 16D, min, maxX, minY); t.setNormal(0, -1, 0); t.addVertexWithUV(min, i / 16D, min, maxX, maxY);// minY t.addVertexWithUV(max, i / 16D, min, minX, maxY); t.addVertexWithUV(max, i / 16D, max, minX, minY); t.addVertexWithUV(min, i / 16D, max, maxX, minY); } t.draw(); GL11.glPopMatrix(); }