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.stormister.rediscovered.RenderGreenVillager.java
License:Open Source License
protected void preRenderVillager(EntityGreenVillager par1EntityGreenVillager, float par2) { float var3 = 0.9375F; if (par1EntityGreenVillager.getGrowingAge() < 0) { var3 = (float) ((double) var3 * 0.5D); this.shadowSize = 0.25F; } else {/*from w ww. j av a 2 s . com*/ this.shadowSize = 0.5F; } GL11.glScalef(var3, var3, var3); }
From source file:com.stormister.rediscovered.RenderTileEntityChair.java
License:Open Source License
public void renderAModelAt(TileEntityChair tile, double d, double d1, double d2, float f) { int rotation = 0; if (tile != null && tile.hasWorldObj()) { rotation = tile.getBlockMetadata(); }// w w w . j a va 2 s.com this.bindTexture(field_110871_a); GL11.glPushMatrix(); GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glScalef(1.0F, -1F, -1F); GL11.glRotatef(rotation * 90, 0.0F, 1.0F, 0.0F); model.renderAll(); GL11.glPopMatrix(); //end }
From source file:com.stormister.rediscovered.RenderTileEntityLockedChest.java
License:Open Source License
public void renderAModelAt(TileEntityLockedChest tile, double d, double d1, double d2, float f) { int rotation = 0; if (tile != null && tile.hasWorldObj()) { rotation = tile.getBlockMetadata(); }/*from w ww . j a va 2 s. c o m*/ this.bindTexture(field_110871_a); GL11.glPushMatrix(); GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glScalef(1.0F, -1F, -1F); GL11.glRotatef(rotation * 90, 0.0F, 1.0F, 0.0F); model.renderAll(); GL11.glPopMatrix(); //end }
From source file:com.stormister.rediscovered.RenderTileEntitySpikes.java
License:Open Source License
public void renderAModelAt(TileEntitySpikes tile, double d, double d1, double d2, float f) { int rotation = 0; if (tile != null && tile.hasWorldObj()) { rotation = tile.getBlockMetadata(); }// ww w .ja v a2 s.co m this.bindTexture(field_110871_a); GL11.glPushMatrix(); GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glScalef(1.0F, -1F, -1F); GL11.glRotatef(rotation * 90, 0.0F, 1.0F, 0.0F); model.renderAll(); GL11.glPopMatrix(); //end }
From source file:com.stormister.rediscovered.RenderTileEntitySpikesSide.java
License:Open Source License
public void renderAModelAt(TileEntitySpikesSide tile, double d, double d1, double d2, float f) { int rotation = 0; if (tile != null && tile.hasWorldObj()) { rotation = tile.getBlockMetadata(); }//from w w w .ja v a 2 s.c o m this.bindTexture(field_110871_a); GL11.glPushMatrix(); GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glScalef(1.0F, -1F, -1F); GL11.glRotatef(rotation * 90, 0.0F, 1.0F, 0.0F); model.renderAll(); GL11.glPopMatrix(); //end }
From source file:com.stormister.rediscovered.RenderTileEntityTable.java
License:Open Source License
/** * Renders the TileEntity for the chest at a position. *///from w ww .ja v a 2s .co m public void render(TileEntityTable par1TileEntityChest, double par2, double par4, double par6, float par8) { int i; this.bindTexture(field_110871_a); if (!par1TileEntityChest.hasWorldObj()) { i = 0; } else { Block block = par1TileEntityChest.getBlockType(); i = par1TileEntityChest.getBlockMetadata(); if (block instanceof BlockTable && i == 0) { i = par1TileEntityChest.getBlockMetadata(); } } ModelTable modelchest; modelchest = this.chestModel; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glTranslatef((float) par2, (float) par4 + 1.0F, (float) par6 + 1.0F); GL11.glScalef(1.0F, -1.0F, -1.0F); GL11.glTranslatef(0.5F, 0.5F, 0.5F); short short1 = 0; GL11.glRotatef((float) short1, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); float f1 = par1TileEntityChest.prevLidAngle + (par1TileEntityChest.lidAngle - par1TileEntityChest.prevLidAngle) * par8; float f2; f1 = 1.0F - f1; f1 = 1.0F - f1 * f1 * f1; modelchest.renderAll(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); //*********************************************** //RENDERS ITEM ON TABLE //*********************************************** // ItemStack itemstack = par1TileEntityChest.getTopItemStacks(); // // if (itemstack != null) // { // EntityItem entityitem = new EntityItem(par1TileEntityChest.worldObj, 0.0D, 0.0D, 0.0D, itemstack); // entityitem.getEntityItem().stackSize = 1; // entityitem.hoverStart = 0.0F; // GL11.glPushMatrix(); // GL11.glTranslatef(-0.453125F * (float)Direction.offsetX[par1TileEntityChest.hangingDirection], -0.18F, -0.453125F * (float)Direction.offsetZ[par1TileEntityChest.hangingDirection]); // GL11.glRotatef(180.0F + par1TileEntityChest.rotationYaw, 0.0F, 1.0F, 0.0F); // GL11.glRotatef((float)(-90 * par1TileEntityChest.getRotation()), 0.0F, 0.0F, 1.0F); // RenderItem.renderInFrame = true; // RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); // RenderItem.renderInFrame = false; // GL11.glPopMatrix(); // } }
From source file:com.teambr.bookshelf.client.gui.component.NinePatchRenderer.java
License:Creative Commons License
protected void renderTopEdge(Gui gui, int width) { GL11.glPushMatrix();//w w w . jav a 2 s. c o m GL11.glTranslatef(cellSize, 0, 0); GL11.glScalef(width - (cellSize * 2), 1, 0); gui.drawTexturedModalRect(0, 0, u + cellSize, v, 1, cellSize); GL11.glPopMatrix(); }
From source file:com.teambr.bookshelf.client.gui.component.NinePatchRenderer.java
License:Creative Commons License
protected void renderBottomEdge(Gui gui, int width, int height) { GL11.glPushMatrix();/*from w w w . ja v a 2 s . c o m*/ GL11.glTranslatef(cellSize, height - cellSize, 0); GL11.glScalef(width - (cellSize * 2), 1, 0); gui.drawTexturedModalRect(0, 0, u + cellSize, v + cellSize + cellSize, 1, cellSize); GL11.glPopMatrix(); }
From source file:com.teambr.bookshelf.client.gui.component.NinePatchRenderer.java
License:Creative Commons License
protected void renderLeftEdge(Gui gui, int height) { GL11.glPushMatrix();//from w w w. j a v a2s . c o m GL11.glTranslatef(0, cellSize, 0); GL11.glScalef(1, height - (cellSize * 2), 0); gui.drawTexturedModalRect(0, 0, u, v + cellSize, cellSize, 1); GL11.glPopMatrix(); }
From source file:com.teambr.bookshelf.client.gui.component.NinePatchRenderer.java
License:Creative Commons License
protected void renderRightEdge(Gui gui, int width, int height) { GL11.glPushMatrix();//from w ww . j a va2s. c o m GL11.glTranslatef(width - cellSize, cellSize, 0); GL11.glScalef(1, height - (cellSize * 2), 0); gui.drawTexturedModalRect(0, 0, u + cellSize + cellSize, v + cellSize, cellSize, 1); GL11.glPopMatrix(); }