List of usage examples for org.lwjgl.opengl GL11 glScalef
public static native void glScalef(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z);
From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL10.java
License:Apache License
public final void glScalef(float x, float y, float z) { GL11.glScalef(x, y, z); }
From source file:com.blogspot.jabelarminecraft.magicbeans.models.ModelGiant.java
License:Open Source License
/** * Renders specific entity to allow access to any specific fields * @param parEntity// w w w . j a va 2 s . c o m * @param par2 * @param par3 * @param par4 * @param par5 * @param par6 * @param par7 */ public void renderGiant(EntityGiant parEntity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(parEntity, par2, par3, par4, par5, par6, par7, parEntity); // scale the whole thing for big or small entities GL11.glPushMatrix(); GL11.glTranslatef(0F, 1.5F - 1.5F * parEntity.getScaleFactor(), 0F); GL11.glScalef(parEntity.getScaleFactor(), parEntity.getScaleFactor(), parEntity.getScaleFactor()); bipedHead.render(par7); bipedBody.render(par7); bipedRightArm.render(par7); bipedLeftArm.render(par7); bipedRightLeg.render(par7); bipedLeftLeg.render(par7); bipedHeadwear.render(par7); // don't forget to pop the matrix for overall scaling GL11.glPopMatrix(); }
From source file:com.blogspot.jabelarminecraft.magicbeans.models.ModelGoldenGoose.java
License:Open Source License
/** * Renders specific entity to allow access to any specific fields * @param parEntity//from w w w . j a v a 2 s .c o m * @param par2 * @param par3 * @param par4 * @param par5 * @param par6 * @param par7 */ public void renderGoldenGoose(EntityGoldenGoose parEntity, float par2, float par3, float par4, float par5, float par6, float par7) { setRotationAngles(par2, par3, par4, par5, par6, par7, parEntity); // scale the whole thing for big or small entities GL11.glPushMatrix(); GL11.glTranslatef(0F, 1.5F - 1.5F * parEntity.getScaleFactor(), 0F); GL11.glScalef(parEntity.getScaleFactor(), parEntity.getScaleFactor(), parEntity.getScaleFactor()); if (isChild) { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 5.0F * par7, 2.0F * par7); head.render(par7); bill.render(par7); chin.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); body.render(par7); rightLeg.render(par7); leftLeg.render(par7); rightWing.render(par7); leftWing.render(par7); GL11.glPopMatrix(); } else { head.render(par7); bill.render(par7); chin.render(par7); body.render(par7); rightLeg.render(par7); leftLeg.render(par7); rightWing.render(par7); leftWing.render(par7); } // don't forget to pop the matrix for overall scaling GL11.glPopMatrix(); }
From source file:com.blogspot.jabelarminecraft.magicbeans.renderers.RenderGoldenEggThrown.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 w ww .j av a2 s.co m*/ @Override public void doRender(Entity parEntity, double parX, double parY, double parZ, float parIgnored1, float parIgnored2) { // IIcon iicon = itemBasisForEntity.getIconFromDamage(iconIndex); // // if (iicon != null) // { GL11.glPushMatrix(); GL11.glTranslatef((float) parX, (float) parY, (float) parZ); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.5F, 0.5F, 0.5F); int l = 0xF5E16F; float f5 = (l >> 16 & 255) / 255.0F; float f6 = (l >> 8 & 255) / 255.0F; float f7 = (l & 255) / 255.0F; GL11.glColor4f(f5, f6, f7, 1.0F); bindEntityTexture(parEntity); Tessellator tessellator = Tessellator.getInstance(); // if (iicon == ItemPotion.func_94589_d("bottle_splash")) // { // int i = PotionHelper.func_77915_a(((EntityPotion)parEntity).getPotionDamage(), false); // float f2 = (i >> 16 & 255) / 255.0F; // float f3 = (i >> 8 & 255) / 255.0F; // float f4 = (i & 255) / 255.0F; // GL11.glColor3f(f2, f3, f4); // GL11.glPushMatrix(); // invokeTesselator(tessellator, ItemPotion.func_94589_d("overlay")); // GL11.glPopMatrix(); // GL11.glColor3f(1.0F, 1.0F, 1.0F); // } // invokeTesselator(tessellator, iicon); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); // } }
From source file:com.blogspot.jabelarminecraft.magicbeans.renderers.RenderMysteriousStranger.java
License:Open Source License
@Override public void passSpecialRender(EntityLivingBase parEntity, double parX, double parY, double parZ) { super.passSpecialRender(parEntity, parX, parY, parZ); if (parEntity.ticksExisted < 20 * 2) { GL11.glPushMatrix();// w w w .j a va2 s .c om GL11.glTranslated(parX, parY + parEntity.height / 2, parZ); GL11.glScalef(3.0F, 3.0F, 3.0F); GL11.glEnable(GL11.GL_BLEND); GL11.glDepthMask(false); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, (40.0F - parEntity.ticksExisted) / 40.0F); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glCallList(ClientProxy.sphereIdOutside); GL11.glCallList(ClientProxy.sphereIdInside); GL11.glPopMatrix(); } }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelBigCat.java
License:Open Source License
public void renderBigCat(EntityBigCat 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); // scale the whole thing for big or small entities GL11.glPushMatrix();//from ww w. java2s . c om GL11.glTranslatef(0F, -0.2F, 0F); // need to figure out how to calculate this from scaleFactor (need to manually tweak currently) GL11.glScalef(entity.getScaleFactor(), entity.getScaleFactor(), entity.getScaleFactor()); if (!isChild) { head.renderWithRotation(f5); body.render(f5); leg1.render(f5); leg2.render(f5); leg3.render(f5); leg4.render(f5); tail.renderWithRotation(f5); } else { float f6 = 2.0F; GL11.glPushMatrix(); GL11.glTranslatef(0.0F, 5.0F * f5, 2.0F * f5); head.renderWithRotation(f5); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6); GL11.glTranslatef(-0.05F, 24.0F * f5, 0.0F); body.render(f5); leg1.render(f5); leg2.render(f5); leg3.render(f5); leg4.render(f5); tail.renderWithRotation(f5); GL11.glPopMatrix(); } // don't forget to pop the matrix for overall scaling GL11.glPopMatrix(); }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelBirdOfPrey.java
License:Open Source License
public void renderBirdOfPrey(EntityBirdOfPrey parEntity, float parRenderFloat) { setRotationAngles(parEntity);//from ww w .j a v a2s .c o m // scale the whole thing for big or small entities GL11.glPushMatrix(); GL11.glScalef(parEntity.getScaleFactor(), parEntity.getScaleFactor(), parEntity.getScaleFactor()); // should only need to render body because all rest are children if (parEntity.getState() == AIStates.STATE_PERCHED || parEntity.getState() == AIStates.STATE_PERCHED_TAMED) { bodyWingless.render(parRenderFloat); } else { body.render(parRenderFloat); } // don't forget to pop the matrix for overall scaling GL11.glPopMatrix(); }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelElephant.java
License:Open Source License
public void renderElephant(EntityElephant 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();/* w ww. j av a2 s. co m*/ GL11.glTranslatef(0F, -1.5F, 0F); 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); childHead.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); body.render(par7); // scale legs slightly to reduce render flicker on overlapping areas GL11.glPushMatrix(); GL11.glScalef(0.99F, 1.00F, 0.99F); legRearRight.render(par7); legRearLeft.render(par7); legFrontRight.render(par7); legFrontLeft.render(par7); GL11.glPopMatrix(); GL11.glPopMatrix(); } else { head.render(par7); body.render(par7); // scale legs slightly to reduce render flicker on overlapping areas GL11.glPushMatrix(); GL11.glScalef(0.99F, 1.00F, 0.99F); legRearRight.render(par7); legRearLeft.render(par7); legFrontRight.render(par7); legFrontLeft.render(par7); GL11.glPopMatrix(); } // don't forget to pop the matrix for overall scaling GL11.glPopMatrix(); }
From source file:com.blogspot.jabelarminecraft.wildanimals.models.ModelRaptor.java
License:Open Source License
@Override public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { // Set Rotation this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); // Initiate Matrix GL11.glPushMatrix();/*from www . ja v a 2 s. c o m*/ // Set Scale GL11.glScalef(1.0F / shrink_factor, 1.0F / shrink_factor, 1.0F / shrink_factor); GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F); this.head.render(par7); this.headb.render(par7); this.headuppera.render(par7); this.headupperb.render(par7); this.tongue.render(par7); this.tooth1a.render(par7); this.tooth2a.render(par7); this.tooth1b.render(par7); this.tooth2b.render(par7); this.tooth1c.render(par7); this.tooth2c.render(par7); this.tooth1d.render(par7); this.tooth2d.render(par7); this.tooth1e.render(par7); this.tooth2e.render(par7); this.tooth1f.render(par7); this.tooth2f.render(par7); this.tooth1g.render(par7); this.tooth2g.render(par7); this.tooth1h.render(par7); this.tooth2h.render(par7); this.tooth1i.render(par7); this.tooth2i.render(par7); this.tooth1j.render(par7); this.tooth2j.render(par7); this.tooth1k.render(par7); this.tooth2k.render(par7); this.tooth1l.render(par7); this.tooth2l.render(par7); this.tooth1m.render(par7); this.tooth2m.render(par7); this.tooth1n.render(par7); this.tooth2n.render(par7); this.tooth1o.render(par7); this.tooth2o.render(par7); // Set Scale GL11.glScalef(0.995F, 1.0F, 1.0F); this.headlowera.render(par7); this.headlowerb.render(par7); GL11.glScalef(1 / 0.995F, 1.0F, 1.0F); this.body.render(par7); //this.neck.render(par7); this.taila.render(par7); this.tailb.render(par7); this.tailc.render(par7); this.taild.render(par7); this.taile.render(par7); this.leftarm.render(par7); this.lefthanda.render(par7); this.lefthandb.render(par7); this.rightarm.render(par7); this.righthanda.render(par7); this.righthandb.render(par7); this.leftleg.render(par7); //this.leftlegb.render(par7); this.leftlegc.render(par7); this.leftfoot.render(par7); this.leftfoottoe1a.render(par7); this.leftfoottoe2a.render(par7); this.leftfoottoe1b.render(par7); this.leftfoottoe2b.render(par7); this.rightleg.render(par7); //this.rightlegb.render(par7); this.rightlegc.render(par7); this.rightfoot.render(par7); this.rightfoottoe1a.render(par7); this.rightfoottoe2a.render(par7); this.rightfoottoe1b.render(par7); this.rightfoottoe2b.render(par7); // Handle Smaller Parts // Set Scale GL11.glScalef(0.995F, 1.0F, 1.0F); this.neck.render(par7); this.leftlegb.render(par7); this.rightlegb.render(par7); this.headlowerb.render(par7); // Finish Matrix GL11.glPopMatrix(); }
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 . ja v a 2 s .co 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(); }