List of usage examples for org.lwjgl.opengl GL11 glTranslated
public static native void glTranslated(@NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z);
From source file:nightkosh.gravestone.models.block.ModelCreeperStatue.java
License:LGPL
private void renderCreeperCharging() { float tickModifier = (float) (Minecraft.getSystemTime() % 3000L) / 3000 * 48; float scale = 1.2F; GL11.glTranslated(0, 0.3, 0); GL11.glScalef(scale, scale, scale);//from w w w . j a v a 2 s .c om TileEntityGraveStoneRenderer.instance.bindTextureByName(Resources.CREEPER_AURA); GlStateManager.depthMask(true); GlStateManager.matrixMode(GL11.GL_TEXTURE); GlStateManager.enableBlend(); GlStateManager.disableLighting(); GlStateManager.blendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE); for (int var21 = 0; var21 < 3; var21++) { GlStateManager.loadIdentity(); float var23 = tickModifier * (0.001F + (float) var21 * 0.0015F) * 15; GL11.glTranslatef(0, var23, 0); renderCreeper(); } GlStateManager.matrixMode(GL11.GL_TEXTURE); GlStateManager.loadIdentity(); GlStateManager.matrixMode(GL11.GL_MODELVIEW); GlStateManager.enableLighting(); GlStateManager.disableBlend(); GlStateManager.depthFunc(GL11.GL_LEQUAL); GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE); }
From source file:nightkosh.gravestone_extended.models.block.memorials.ModelCreeperStatueMemorial.java
License:LGPL
private void renderCreeperCharging() { float tickModifier = (float) (Minecraft.getSystemTime() % 3000L) / 3000 * 48; float scale = 1.2F; float f4 = 0.5F; GL11.glTranslated(0, -0.5, 0); GL11.glScalef(scale, scale, scale);//from w w w.jav a 2 s . co m TileEntityMemorialRenderer.instance.bindTextureByName(Resources.CREEPER_AURA); GlStateManager.depthMask(true); GlStateManager.matrixMode(GL11.GL_TEXTURE); GlStateManager.enableBlend(); GlStateManager.disableLighting(); GlStateManager.blendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE); for (int var21 = 0; var21 < 3; ++var21) { GlStateManager.loadIdentity(); float var23 = tickModifier * (0.001F + (float) var21 * 0.0015F) * 15; GL11.glTranslatef(0, var23, 0); renderCreeper(); } GlStateManager.matrixMode(GL11.GL_TEXTURE); GlStateManager.loadIdentity(); GlStateManager.matrixMode(GL11.GL_MODELVIEW); GlStateManager.enableLighting(); GlStateManager.disableBlend(); GlStateManager.depthFunc(GL11.GL_LEQUAL); GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE); GL11.glTranslated(0, -0.19, 0); }
From source file:nightkosh.gravestone_extended.models.block.ModelPileOfBones.java
License:LGPL
public void renderAll(boolean haveSkull) { float f5 = 0.0625F; bone1.render(f5);/* www. ja va 2s . c om*/ bone2.render(f5); bone3.render(f5); bone4.render(f5); bone5.render(f5); bone6.render(f5); bone7.render(f5); bone8.render(f5); if (haveSkull) { Minecraft.getMinecraft().renderEngine.bindTexture(Resources.SKELETON_SKULL_CANDLE); GL11.glPushMatrix(); GL11.glTranslated(0.4, 0, 0.5); GL11.glRotated(45, 0, 1, 0); skull.renderWithTexture(f5, false); GL11.glPopMatrix(); } }
From source file:nightkosh.gravestone_extended.models.block.ModelSkullCandle.java
License:LGPL
public void renderAll(ModelRendererSkull.EnumSkullType skullType) { skull.renderWithTexture(0.0625F, skullType); TileEntityMemorialRenderer.instance.bindTextureByName(Resources.CANDLE); GL11.glPushMatrix();/*ww w. ja va2 s. c o m*/ GL11.glTranslated(0, -0.34, -0.07); candle.renderAll(); GL11.glPopMatrix(); }
From source file:nightkosh.gravestone_extended.models.block.ModelSpawnerPentagram.java
License:LGPL
public void renderAll() { pentagram.render(0.0625F);//from w w w . j a va2s . c o m GL11.glPushMatrix(); GL11.glTranslated(0, 0, 1); GL11.glRotated(180, 0, 1, 0); candle1.renderAll(skullType); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslated(0.95, 0, 0.3); GL11.glRotated(252, 0, 1, 0); candle2.renderAll(skullType); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslated(-0.95, 0, 0.3); GL11.glRotated(108, 0, 1, 0); candle3.renderAll(skullType); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslated(-0.59, 0, -0.8); GL11.glRotated(36, 0, 1, 0); candle4.renderAll(skullType); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glTranslated(0.61, 0, -0.8); GL11.glRotated(-36, 0, 1, 0); candle5.renderAll(skullType); GL11.glPopMatrix(); }
From source file:nightkosh.gravestone_extended.models.entity.ModelBarghest.java
License:LGPL
@Override public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7) { GL11.glPushMatrix();/*from w ww .j a v a 2 s .co m*/ GL11.glScaled(2, 2, 2); GL11.glTranslated(0, -0.7, 0); super.render(entity, par2, par3, par4, par5, par6, par7); GL11.glPopMatrix(); }
From source file:nightkosh.gravestone_extended.models.entity.ModelSkullCrawler.java
License:LGPL
@Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); GL11.glPushMatrix();/*from w w w . j a v a 2 s. com*/ // if (((EntitySkullCrawler) entity).isOnLadder()) { // System.out.println(entity.getHorizontalFacing().getName());//TODO // switch (((EntitySkullCrawler) entity).getWallSide()) { // case FORWARD: // GL11.glRotatef(90, -1, 0, 0); // break; // case LEFT: // GL11.glRotatef(90, 0, -1, 0); // break; // case RIGHT: // GL11.glRotatef(90, 0, 1, 0); // break; // } // } GL11.glTranslated(0, -0.05, 0); skull.render(0.0625F); rightLeg1.render(f5); rightLeg2.render(f5); rightLeg3.render(f5); rightLeg4.render(f5); leftLeg1.render(f5); leftLeg2.render(f5); leftLeg3.render(f5); leftLeg4.render(f5); GL11.glPopMatrix(); // if (((EntitySkullCrawler) entity).isOnLadder()) { // GL11.glPopMatrix(); // } }
From source file:nightkosh.gravestone_extended.renderer.item.TEISRCorpse.java
License:LGPL
public static void renderCorpseOnAltar(ItemStack item, double x, double y, double z, float ticks) { if (item != null) { GL11.glPushMatrix();// w w w .j a v a 2 s . c om float time = Minecraft.getMinecraft().world.getTotalWorldTime() + ticks; GL11.glTranslated(x + 0.5F, y + 1.2F, z + 0.5F); GL11.glRotatef(time % 360, 0, 1, 0); CorpseRendererHelper.renderCorpse(EnumCorpse.getById((byte) item.getItemDamage()), item.getTagCompound(), true); GL11.glPopMatrix(); } }
From source file:nightkosh.gravestone_extended.renderer.item.TEISRCorpse.java
License:LGPL
@Override public void renderByItem(ItemStack stack) { GL11.glPushMatrix();// w w w . j a v a 2s . co m GL11.glRotatef(-35, 0, 1, 0); GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glTranslated(1.7F, 0, 0); CorpseRendererHelper.renderCorpse(EnumCorpse.getById((byte) stack.getItemDamage()), stack.getTagCompound(), false); GL11.glPopMatrix(); }
From source file:nightkosh.gravestone_extended.renderer.tileentity.TileEntityCorpseRenderer.java
License:LGPL
public static void renderCorpseOnAltar(ItemStack item, double x, double y, double z, float ticks) { if (item != null) { GL11.glPushMatrix();// w ww.j a va2s.c o m float time = Minecraft.getMinecraft().theWorld.getTotalWorldTime() + ticks; GL11.glTranslated(x + 0.5F, y + 1.2F, z + 0.5F); GL11.glRotatef(time % 360, 0, 1, 0); CorpseRendererHelper.renderCorpse(EnumCorpse.getById((byte) item.getItemDamage()), item.getTagCompound(), true); GL11.glPopMatrix(); } }