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:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderSatelite.java
License:Creative Commons License
public void renderSatelite(EntitySatelite entitySatelite, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix();/*from w w w . j a va 2s . com*/ GL11.glTranslatef((float) par2, (float) par4, (float) par6); GL11.glRotatef(180.0F - par8, 0.0F, 1.0F, 0.0F); GL11.glRotatef( entitySatelite.prevRotationYaw + (entitySatelite.rotationYaw - entitySatelite.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef( entitySatelite.prevRotationPitch + (entitySatelite.rotationPitch - entitySatelite.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F); GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); float f4 = 5.75F; GL11.glScalef(f4, f4, f4); GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4); this.bindEntityTexture(entitySatelite); GL11.glScalef(-1.0F, -1.0F, 1.0F); this.model.render(entitySatelite, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderSuperCreeper.java
License:Creative Commons License
protected void updateMobSuperCreeperScale(MobSuperCreeper mob, float par2) { float var4 = mob.setCreeperFlashTime(par2); float var5 = 1.0F + MathHelper.sin(var4 * 100.0F) * var4 * 0.01F; if (var4 < 0.0F) { var4 = 0.0F; }/*from w w w.jav a 2 s . c om*/ if (var4 > 1.0F) { var4 = 1.0F; } var4 *= var4; var4 *= var4; float var6 = (1.0F + var4 * 0.4F) * var5; float var7 = (1.0F + var4 * 0.1F) / var5; GL11.glScalef(var6, var7, var6); }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderSuperEnderman.java
License:Creative Commons License
protected void renderCarrying(MobSuperEnderman superEnderMan, float par2) { super.renderEquippedItems(superEnderMan, par2); if (superEnderMan.func_146080_bZ().getMaterial() != Material.air) { GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glPushMatrix();/*from w w w .j a v a2 s. c o m*/ float f1 = 0.5F; GL11.glTranslatef(0.0F, 0.6875F, -0.75F); f1 *= 1.0F; GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(-f1, -f1, f1); int i = superEnderMan.getBrightnessForRender(par2); int j = i % 65536; int k = i / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.bindTexture(TextureMap.locationBlocksTexture); this.field_147909_c.renderBlockAsItem(superEnderMan.func_146080_bZ(), superEnderMan.getCarryingData(), 1.0F); GL11.glPopMatrix(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); } }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderTheDeath.java
License:Creative Commons License
protected void preRenderScale(MobThedeath mob, float par2) { GL11.glScalef(3F, 3F, 3F); }
From source file:fr.mcnanotech.kevin_68.nanotechmod.main.client.renderer.RenderTheDeath.java
License:Creative Commons License
protected void renderTheDeathEquippedItems(MobThedeath living, float par2) { float f1 = 1.0F; GL11.glColor3f(f1, f1, f1);/*www . j a v a 2s . c o m*/ super.renderEquippedItems(living, par2); ItemStack itemstack = living.getHeldItem(); float f2; if (itemstack != null) { GL11.glPushMatrix(); if (this.mainModel.isChild) { f2 = 0.5F; GL11.glTranslatef(0.0F, 0.625F, 0.0F); GL11.glRotatef(-20.0F, -1.0F, 0.0F, 0.0F); GL11.glScalef(f2, f2, f2); } GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F); IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D)); if (itemstack.getItem().equals(NanotechItem.scythe)) { GL11.glRotatef(120F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(160F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(-15F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.5F, 1.0F, 1.3F); } else if (itemstack.getItem().isFull3D()) { f2 = 0.625F; if (itemstack.getItem().shouldRotateAroundWhenRendering()) { GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -0.125F, 0.0F); } GL11.glTranslatef(0.0F, 0.1875F, 0.0F); GL11.glScalef(f2, -f2, f2); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } else { f2 = 0.375F; GL11.glTranslatef(0.25F, 0.1875F, -0.1875F); GL11.glScalef(f2, f2, f2); GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F); } this.renderManager.itemRenderer.renderItem(living, itemstack, 0); if (itemstack.getItem().requiresMultipleRenderPasses()) { for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) { this.renderManager.itemRenderer.renderItem(living, itemstack, x); } } GL11.glPopMatrix(); } }
From source file:fractal.PolygonFractal.java
public void draw(int depth, double size, double angle) { GL11.glPushMatrix();/*w ww. ja v a2 s . c o m*/ GL11.glScalef((float) size, (float) size, (float) size); next(depth, angle); GL11.glPopMatrix(); }
From source file:fractal.PolygonFractal.java
public void next(int depth, double angle) { GL11.glRotatef((float) angle, 0, 0, 1); float sector = 2f * (float) Math.PI / (float) num_verts; /*GL11.glColor3f((float)Math.sin(color_basis) / 2f + 0.5f, (float)Math.sin(color_basis + Math.PI / 1.5) / 2f + 0.5f, (float)Math.sin(color_basis + Math.PI / 0.75) / 2f + 0.5f);*/ GL11.glBegin(GL11.GL_LINE_STRIP);// w ww.j av a 2 s . co m for (int i = 0; i <= num_verts; i++) { float a = sector * i; GL11.glVertex2f((float) Math.cos(a), (float) Math.sin(a)); } GL11.glEnd(); if (depth > 0) { for (int i = 0; i < num_verts; i++) { GL11.glRotatef(sector * 180f / (float) Math.PI, 0, 0, 1); GL11.glPushMatrix(); GL11.glTranslatef(1, 0, 0); GL11.glScalef(mult, mult, mult); next(depth - 1, angle * ang_mult); GL11.glPopMatrix(); } } }
From source file:go.graphics.swing.opengl.LWJGLDrawContext.java
License:Open Source License
@Override public void glScalef(float x, float y, float z) { GL11.glScalef(x, y, z); }
From source file:gravestone.models.block.graves.ModelCatStatueGraveStone.java
License:LGPL
@Override public void renderAll() { this.setRotationAngles(0.0625F, 0.0625F, 0.0625F, 0.0625F); float par7 = 0.0625F; float f6 = 2.0F; GL11.glPushMatrix();/*from w ww.ja v a 2s . c o m*/ GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6); GL11.glTranslatef(0.0F, 10.0F * par7, 4.0F * par7); this.ocelotHead.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); this.ocelotBody.render(par7); this.ocelotBackLeftLeg.render(par7); this.ocelotBackRightLeg.render(par7); this.ocelotFrontLeftLeg.render(par7); this.ocelotFrontRightLeg.render(par7); this.ocelotTail.render(par7); this.ocelotTail2.render(par7); GL11.glPopMatrix(); }
From source file:gravestone.models.block.graves.ModelDogStatueGraveStone.java
License:LGPL
@Override public void renderAll() { this.setRotationAngles(0.0625F, 0.0625F, 0.0625F, 0.0625F); float par7 = 0.0625F; GL11.glPushMatrix();/*from ww w .j av a 2 s . c o m*/ GL11.glTranslatef(0.0F, 5.0F * par7, 2.0F * par7); this.wolfHeadMain.renderWithRotation(par7); GL11.glPopMatrix(); GL11.glPushMatrix(); GL11.glScalef(0.5F, 0.5F, 0.5F); GL11.glTranslatef(0.0F, 24.0F * par7, 0.0F); this.wolfBody.render(par7); this.wolfLeg1.render(par7); this.wolfLeg2.render(par7); this.wolfLeg3.render(par7); this.wolfLeg4.render(par7); this.wolfMane.render(par7); this.wolfTail.render(par7); GL11.glPopMatrix(); }