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.theoriginalbit.moarperipherals.client.render.RendererItemSonic.java
License:Apache License
@Override protected void manipulateInventoryRender(ItemStack stack) { float scale = 0.3f; GL11.glScalef(scale, scale, scale);//w w w . j a va2 s . c o m GL11.glRotatef(180, 1, 0, 0); GL11.glTranslatef(0f, 1f, 0f); }
From source file:com.theoriginalbit.moarperipherals.client.render.RendererItemSonic.java
License:Apache License
@Override protected void manipulateThirdPersonRender(ItemStack stack) { float scale = 0.225f; GL11.glScalef(scale, scale, scale);/*from w ww . j ava 2 s. c o m*/ GL11.glRotatef(175, 1, 0, 0); GL11.glTranslatef(0f, -3.5f, -4.5f); }
From source file:com.theoriginalbit.moarperipherals.client.render.RendererItemSonic.java
License:Apache License
@Override protected void manipulateFirstPersonRender(ItemStack stack) { float scale = 0.25f; GL11.glScalef(scale, scale, scale);/* ww w . j av a2 s . c o m*/ GL11.glRotatef(180, 1, 0, 0); GL11.glRotatef(-90, 0, 1, 0); GL11.glRotatef(10, 0, 0, 1); GL11.glTranslatef(-3f, -3f, 0f); }
From source file:com.theoriginalbit.moarperipherals.client.render.RendererTileAntenna.java
License:Apache License
@Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float t) { TileAntennaController tile = (TileAntennaController) tileEntity; if (tile.isTowerComplete()) { GL11.glPushMatrix();/* w ww . j a v a2 s . co m*/ GL11.glTranslatef((float) x + 0.5f, (float) y + 0.5f, (float) z + 0.5f); GL11.glRotatef(180, 0, 0, 1); GL11.glTranslatef(0.0f, -1.0f, 0.0f); GL11.glPushMatrix(); bindTexture(Constants.TEXTURES_MODEL.ANTENNA.getResourceLocation()); model.render(null, 0F, 0F, 0f, 0f, 0f, 0.0625f); GL11.glPopMatrix(); GL11.glPopMatrix(); } }
From source file:com.theslarfab.tmnmod.client.model.ModelHippopotamus.java
License:Open Source License
@Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { {/*from w w w. j a v a 2s . c o m*/ this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); if (this.isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F); this.tailBase.render(f5); this.body.render(f5); this.leg4.render(f5); this.leg1.render(f5); this.leg2.render(f5); this.leg3.render(f5); this.head.render(f5); GL11.glPopMatrix(); } else { this.tailBase.render(f5); this.body.render(f5); this.leg4.render(f5); this.leg1.render(f5); this.leg2.render(f5); this.leg3.render(f5); this.head.render(f5); } } }
From source file:com.theslarfab.tmnmod.client.model.ModelKangaroo.java
License:Open Source License
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { {//from ww w . ja va2 s . co m this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); if (this.isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F); this.lleg.render(f5); this.tail1.render(f5); this.tail2.render(f5); this.rleg.render(f5); this.rarm.render(f5); this.larm.render(f5); this.body.render(f5); this.neck.render(f5); GL11.glPopMatrix(); } else { this.lleg.render(f5); this.tail1.render(f5); this.tail2.render(f5); this.rleg.render(f5); this.rarm.render(f5); this.larm.render(f5); this.body.render(f5); this.neck.render(f5); } } }
From source file:com.theslarfab.tmnmod.client.model.ModelLonghorn.java
License:Open Source License
@Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { {/*from w w w.java 2s . c om*/ this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); if (this.isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5); this.head.render(f5); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F); this.rleg1.render(f5); this.lleg2.render(f5); this.lleg1.render(f5); this.rleg2.render(f5); this.body.render(f5); GL11.glPopMatrix(); } else { this.rleg1.render(f5); this.lleg2.render(f5); this.head.render(f5); this.lleg1.render(f5); this.rleg2.render(f5); this.body.render(f5); } } }
From source file:com.theslarfab.tmnmod.client.model.ModelZebra.java
License:Open Source License
@Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { {/*from w ww .j a va2 s .c o m*/ this.setRotationAngles(f, f1, f2, f3, f4, f5, entity); if (this.isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F); this.leg1A.render(f5); this.leg4A.render(f5); this.leg2A.render(f5); this.leg3A.render(f5); this.body.render(f5); this.neck.render(f5); GL11.glPopMatrix(); } else { this.leg1A.render(f5); this.leg4A.render(f5); this.leg2A.render(f5); this.leg3A.render(f5); this.body.render(f5); this.neck.render(f5); } } }
From source file:com.theslarfab.tmnmod.client.renderer.tileentity.TileEntityEndWoodChestRenderer.java
License:Open Source License
public void renderTileEntityAt(TileEntityEndWoodChest p_147502_1_, double p_147502_2_, double p_147502_4_, double p_147502_6_, float p_147502_8_) { int i;/* w w w . j a v a2 s .c o m*/ if (!p_147502_1_.hasWorldObj()) { i = 0; } else { Block block = p_147502_1_.getBlockType(); i = p_147502_1_.getBlockMetadata(); if (block instanceof BlockEndWoodChest && i == 0) { try { ((BlockEndWoodChest) block).func_149954_e(p_147502_1_.getWorldObj(), p_147502_1_.xCoord, p_147502_1_.yCoord, p_147502_1_.zCoord); } catch (ClassCastException e) { FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", p_147502_1_.xCoord, p_147502_1_.yCoord, p_147502_1_.zCoord); } i = p_147502_1_.getBlockMetadata(); } p_147502_1_.checkForAdjacentChests(); } if (p_147502_1_.adjacentChestZNeg == null && p_147502_1_.adjacentChestXNeg == null) { ModelChest modelchest; if (p_147502_1_.adjacentChestXPos == null && p_147502_1_.adjacentChestZPos == null) { modelchest = this.singleChest; this.bindTexture(chestTexture); } else { modelchest = this.doubleChest; this.bindTexture(doubleChestTexture); } GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glTranslatef((float) p_147502_2_, (float) p_147502_4_ + 1.0F, (float) p_147502_6_ + 1.0F); GL11.glScalef(1.0F, -1.0F, -1.0F); GL11.glTranslatef(0.5F, 0.5F, 0.5F); short short1 = 0; if (i == 2) { short1 = 180; } if (i == 3) { short1 = 0; } if (i == 4) { short1 = 90; } if (i == 5) { short1 = -90; } if (i == 2 && p_147502_1_.adjacentChestXPos != null) { GL11.glTranslatef(1.0F, 0.0F, 0.0F); } if (i == 5 && p_147502_1_.adjacentChestZPos != null) { GL11.glTranslatef(0.0F, 0.0F, -1.0F); } GL11.glRotatef((float) short1, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); float f1 = p_147502_1_.prevLidAngle + (p_147502_1_.lidAngle - p_147502_1_.prevLidAngle) * p_147502_8_; float f2; if (p_147502_1_.adjacentChestZNeg != null) { f2 = p_147502_1_.adjacentChestZNeg.prevLidAngle + (p_147502_1_.adjacentChestZNeg.lidAngle - p_147502_1_.adjacentChestZNeg.prevLidAngle) * p_147502_8_; if (f2 > f1) { f1 = f2; } } if (p_147502_1_.adjacentChestXNeg != null) { f2 = p_147502_1_.adjacentChestXNeg.prevLidAngle + (p_147502_1_.adjacentChestXNeg.lidAngle - p_147502_1_.adjacentChestXNeg.prevLidAngle) * p_147502_8_; if (f2 > f1) { f1 = f2; } } f1 = 1.0F - f1; f1 = 1.0F - f1 * f1 * f1; modelchest.chestLid.rotateAngleX = -(f1 * (float) Math.PI / 2.0F); modelchest.renderAll(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } }
From source file:com.xlogisticzz.learningModding.client.RenderSpaceship.java
License:LGPL
public void renderSpaceship(EntitySpaceship spaceship, double x, double y, double z, float yaw, float partialTickTime) { GL11.glPushMatrix();//from w w w .j a v a 2 s.c o m GL11.glTranslatef((float) x, (float) y, (float) z); GL11.glRotatef(180.0F - yaw, 0.0F, 1.0F, 0.0F); GL11.glScalef(-1.0F, -1.0F, 1.0F); bindEntityTexture(spaceship); this.model.render(spaceship, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); }