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:basedefense.client.renderer.item.surveillance.DNANeedleRenderer.java
License:Apache License
/** * {@inheritDoc}/*w w w . j a va 2 s . c o m*/ */ @Override protected void renderEntity(ItemStack itemStack, Object... data) { GL11.glScalef(0.125f, 0.125f, 0.125f); GL11.glTranslatef(0.0f, 5.0f, 0.0f); this.renderModel(itemStack); }
From source file:basedefense.client.renderer.item.surveillance.DNANeedleRenderer.java
License:Apache License
/** * {@inheritDoc}/*ww w. j a va 2s .c om*/ */ @Override protected void renderInventory(ItemStack itemStack, Object... data) { GL11.glScalef(0.125f, 0.125f, 0.125f); this.renderModel(itemStack); }
From source file:basedefense.client.renderer.item.surveillance.DNANeedleRenderer.java
License:Apache License
/** * {@inheritDoc}//w ww . ja v a 2s. c om */ @Override protected void setupEquippedCommon(ItemStack itemStack, Object... data) { GL11.glScalef(0.25f, 0.25f, 0.25f); GL11.glRotatef(180, 0.0f, 1.0f, 0.0f); }
From source file:basedefense.client.renderer.item.surveillance.GooglyEyeRenderer.java
License:Apache License
/** * Renders the model at a certain distance from the center. * * @param distance The distance./*from ww w . ja v a 2 s .c o m*/ * @param scale The model scale. */ private void renderModel(float distance, float scale) { GL11.glPushMatrix(); { GL11.glTranslatef(distance, 0.0f, 0.0f); GL11.glScalef(scale, scale, scale); Minecraft.getMinecraft().renderEngine.bindTexture( new ResourceLocation("basedefense2", "textures/models/surveillance_googly_eye.png")); EYE_MODEL.renderAll(); } GL11.glPopMatrix(); }
From source file:boilerplate.client.renderers.block.RenderMinedBlock.java
License:Minecraft Mod Public
public void doRender(EntityMinedBlock entBlock, double posX, double posY, double posZ, float f, float renderTick) { World world = entBlock.getWorldObj(); Block block = entBlock.getBlock();//from ww w . ja v a2 s . co m MathHelper.floor_double(entBlock.posX); MathHelper.floor_double(entBlock.posY); MathHelper.floor_double(entBlock.posZ); GL11.glDisable(GL11.GL_LIGHTING); GL11.glPushMatrix(); GL11.glTranslatef((float) posX, (float) posY, (float) posZ); this.bindEntityTexture(entBlock); float scale = entBlock.scale; float rot = world.getWorldTime() * 17.6F; GL11.glScalef(scale, scale, scale); if (entBlock.doesRotate) GL11.glRotatef(rot, 0 - world.rand.nextFloat(), 0 - world.rand.nextFloat(), 0 - world.rand.nextFloat()); this.blockRenderer.blockAccess = entBlock.worldObj; this.blockRenderer.useInventoryTint = true; this.blockRenderer.setRenderBoundsFromBlock(block); this.blockRenderer.renderBlockAsItem(block, entBlock.metadata, 1.0F); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:boilerplate.client.renderers.RenderFloatingItem.java
License:Minecraft Mod Public
public static void render(double dx, double dy, double dz, float rotX, float rotY, float rotZ, ItemStack stack) {//from w w w . jav a 2 s . c o m EntityItem entItem = new EntityItem(ClientHelper.world(), 0D, 0D, 0D, stack); // Without the below line, the item will spazz out entItem.hoverStart = 0.0F; RenderItem.renderInFrame = true; GL11.glTranslatef((float) dx, (float) dy, (float) dz); GL11.glRotatef(rotX, 1, 0, 0); GL11.glRotatef(rotY, 0, 1, 0); GL11.glRotatef(rotZ, 0, 0, 1); GL11.glScalef(1.3F, 1.3F, 1.3F); RenderManager.instance.renderEntityWithPosYaw(entItem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); RenderItem.renderInFrame = false; }
From source file:boilerplate.client.renderers.RenderFloatingItem.java
License:Minecraft Mod Public
public static void render(double dx, double dy, double dz, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ, ItemStack stack) { EntityItem entItem = new EntityItem(ClientHelper.world(), 0D, 0D, 0D, stack); // Without the below line, the item will spazz out entItem.hoverStart = 0.0F;//from w w w .j a v a 2s .c o m RenderItem.renderInFrame = true; GL11.glTranslatef((float) dx, (float) dy, (float) dz); GL11.glRotatef(rotX, 1, 0, 0); GL11.glRotatef(rotY, 0, 1, 0); GL11.glRotatef(rotZ, 0, 0, 1); GL11.glScalef(scaleX, scaleY, scaleZ); RenderManager.instance.renderEntityWithPosYaw(entItem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F); RenderItem.renderInFrame = false; }
From source file:buildcraft.builders.render.RenderConstructionMarker.java
License:Minecraft Mod Public
public void doRenderItem(ItemStack stack, double x, double y, double z) { if (stack == null) { return;//from w ww.j av a 2s . c o m } float renderScale = 1.5f; GL11.glPushMatrix(); GL11.glTranslatef((float) x, (float) y, (float) z); GL11.glTranslatef(0, 0.25F, 0); GL11.glScalef(renderScale, renderScale, renderScale); dummyEntityItem.setEntityItemStack(stack); customRenderItem.doRender(dummyEntityItem, 0, 0, 0, 0, 0); GL11.glPopMatrix(); }
From source file:buildcraft.builders.RenderBuilder.java
License:Minecraft Mod Public
public void doRenderItem(BuildingItem i, float light) { if (i == null) { return;/*from w w w . j av a 2 s . c o m*/ } i.displayUpdate(); for (StackAtPosition s : i.getStacks()) { if (s.display) { float renderScale = 0.7f; GL11.glPushMatrix(); GL11.glTranslatef((float) s.pos.x, (float) s.pos.y, (float) s.pos.z); GL11.glTranslatef(0, 0.25F, 0); GL11.glScalef(renderScale, renderScale, renderScale); dummyEntityItem.setEntityItemStack(s.stack); customRenderItem.doRender(dummyEntityItem, 0, 0, 0, 0, 0); GL11.glPopMatrix(); } } }
From source file:buildcraft.core.render.RenderBuildingItems.java
License:Minecraft Mod Public
private void doRenderItem(BuildingItem i, float light) { if (i == null) { return;/* w ww.j av a 2s . c om*/ } i.displayUpdate(); for (StackAtPosition s : i.getStacks()) { if (s.display) { float renderScale = 0.7f; GL11.glPushMatrix(); GL11.glTranslatef((float) s.pos.x, (float) s.pos.y, (float) s.pos.z); GL11.glTranslatef(0, 0.25F, 0); GL11.glScalef(renderScale, renderScale, renderScale); dummyEntityItem.setEntityItemStack(s.stack); customRenderItem.doRender(dummyEntityItem, 0, 0, 0, 0, 0); GL11.glPopMatrix(); } } }