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.freyja.FES.client.models.ModelReceptacle.java
License:LGPL
public void render(RoutingEntity te, double x, double y, double z) { GL11.glPushMatrix();//w w w . java 2 s . c o m GL11.glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f); ForgeDirection orientation = te.getOrientation(); if (orientation == ForgeDirection.DOWN) { GL11.glRotatef(180, 1, 0, 0); GL11.glTranslatef(0, -1f, 0f); } if (orientation == ForgeDirection.SOUTH) { GL11.glRotatef(90, 1, 0, 0); GL11.glTranslatef(0, -.5f, -.5f); } if (orientation == ForgeDirection.NORTH) { GL11.glRotatef(90, -1, 0, 0); GL11.glTranslatef(0, -.5f, .5f); } if (orientation == ForgeDirection.WEST) { GL11.glRotatef(90, 0, 0, 1); GL11.glTranslatef(.5f, -.5f, 0); } if (orientation == ForgeDirection.EAST) { GL11.glRotatef(90, 0, 0, -1); GL11.glTranslatef(-.5f, -.5f, 0); } GL11.glScalef(0.5f, 0.5f, 0.5f); FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/FES/textures/receptacle.png"); this.render(); GL11.glPopMatrix(); }
From source file:com.freyja.FES.client.renderers.ItemRenderInjector.java
License:LGPL
private void renderInjector(float x, float y, float z, float scale) { GL11.glPushMatrix();/*from ww w . ja va 2s. c o m*/ GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslatef(x, y, z); GL11.glScalef(scale, scale, scale); GL11.glRotatef(180f, 0f, 1f, 0f); FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/FES/textures/injector.png"); modelInjector.render(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.ggollmer.inevera.client.renderer.GreatwardComponentBlockRenderer.java
License:LGPL
@Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { if (!(block instanceof BlockGreatwardComponent)) { return;//w w w . ja v a 2 s . c o m } renderer.setOverrideBlockTexture( ((BlockGreatwardComponent) block).getCoreIcon(~BlockGreatwardComponent.ACTIVE_BIT)); GL11.glScalef(0.99f, 0.99f, 0.99f); renderer.useInventoryTint = true; renderer.renderBlockAsItem(Block.stone, metadata, modelID); renderer.clearOverrideBlockTexture(); GL11.glScalef(1.0101010101f, 1.0101010101f, 1.0101010101f); renderer.setOverrideBlockTexture(((BlockGreatwardComponent) block).getIcon(0, metadata)); renderer.renderBlockAsItem(Block.glass, metadata, modelID); renderer.clearOverrideBlockTexture(); }
From source file:com.hamcybo.sa.render.Render_Hare.java
License:LGPL
protected void preRenderScale(Entity_Hare par1Entity_Hare, float par2) { GL11.glScalef(par1Entity_Hare.size_mod - 0.3f, par1Entity_Hare.size_mod - 0.3f, par1Entity_Hare.size_mod - 0.3f); }//from w w w . j ava 2 s.c o m
From source file:com.irr310.i3d.scene.element.I3dElement.java
License:Open Source License
/** * Internal public method Mthode principal du rendu d'un lment. Cette * mthode appelle le code de rendu spcifique de l'lment via la mthode * doDisplay si ncessaire.//www.j av a 2 s .c o m * * @param gl * context gl du rendu * @param camera * point de vue */ final public void display(I3dCamera camera) { if (!visible) { return; } if (!inited) { init(); } GL11.glPushMatrix(); if (transformMatrix != null) { GL11.glMultMatrix(transformMatrix); } else { if (rotation.x != 0) { GL11.glRotatef(rotation.x, 1, 0, 0); } if (rotation.y != 0) { GL11.glRotatef(rotation.y, 0, 1, 0); } if (rotation.z != 0) { GL11.glRotatef(rotation.z, 0, 0, 1); } if (position.x != 0 || position.y != 0 || position.z != 0) { GL11.glTranslatef(position.x, position.y, position.z); } } if (scale.x != 1 || scale.y != 1 || scale.z != 1) { GL11.glScalef(scale.x, scale.y, scale.z); } animation.preDisplay(); if (animation.doDisplay()) { if (showShape) { doDisplay(camera); } if (showBoundingBox) { getBoundingBox().display(); } } animation.postDisplay(); GL11.glPopMatrix(); }
From source file:com.irr310.i3d.scene.element.I3dElement.java
License:Open Source License
/** * Internal public method Mthode principal du rendu de selection d'un * lment. Cette mthode appelle le code de rendu de selection spcifique * de l'lment via la mthode doSelect si ncessaire. Les animations * n'entrent pas en jeu dans le rendu de selection. * /*from w w w .j av a 2s . c om*/ * @param gl * context gl du rendu de selection * @param camera * point de vue */ final public void select(I3dCamera camera, long parentId) { if (!inited) { init(); } if (!isTangible() || !showShape) { return; } GL11.glPushMatrix(); // TODO: verify this cast. Maybe change id from long to int if (selectable) { GL11.glLoadName((int) id); } if (rotation.x != 0) { GL11.glRotatef(rotation.x, 1, 0, 0); } if (rotation.y != 0) { GL11.glRotatef(rotation.y, 0, 1, 0); } if (rotation.z != 0) { GL11.glRotatef(rotation.z, 0, 0, 1); } if (position.x != 0 || position.y != 0 || position.z != 0) { GL11.glTranslatef(position.x, position.y, position.z); } if (scale.x != 1 || scale.y != 1 || scale.z != 1) { GL11.glScalef(scale.x, scale.y, scale.z); } if (selectable) { doSelect(camera, id); } else { doSelect(camera, parentId); } if (selectable) { GL11.glLoadName((int) parentId); } GL11.glPopMatrix(); }
From source file:com.jmanpenilla.carbonmod.client.render.item.RenderCompressionChamberItem.java
License:LGPL
private static void renderCompressionChamber(float x, float y, float z, float scale) { GL11.glPushMatrix();/*www . j a va2 s .co m*/ // Disable Lighting Calculations GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslatef(x, y, z); FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE); GL11.glScalef(scale, scale, scale); GL11.glRotatef(180f, 0f, 0f, 1f); RenderCompressionChamber.model.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); // Re-enable Lighting Calculations GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:com.jmex.bui.BGlComponent.java
License:Open Source License
@Override public void renderComponent(final Renderer renderer) { super.renderComponent(renderer); GL11.glPushMatrix();//w ww . j av a2 s . c o m BComponent.applyDefaultStates(); GL11.glScalef(_width, _height, 0); renderGl(); GL11.glPopMatrix(); }
From source file:com.kanbekotori.keycraft.renderer.RenderJavelin.java
License:Open Source License
public void doRender(EntityJavelin entity, double x, double y, double z, float p_76986_8_, float p_76986_9_) { this.bindEntityTexture(entity); GL11.glPushMatrix();// w w w . j ava 2 s . co m GL11.glTranslated(x, y, z); // GL11.glTranslatef(0.0F, entity.height / 2.0F, 0.0F); GL11.glRotatef(entity.prevRotationYaw - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(entity.prevRotationPitch, 0.0F, 0.0F, 1.0F); Tessellator tessellator = Tessellator.instance; GL11.glEnable(GL12.GL_RESCALE_NORMAL); float f10 = 0.05625F; GL11.glScalef(f10, f10, f10); for (int i = 0; i < 4; ++i) { GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); GL11.glNormal3f(0.0F, 0.0F, f10); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-3.25D, -0.5D, 0.0D, 1.0D / 16.0D, 14.0D / 16.0D); // tessellator.addVertexWithUV(3.25D, -0.5D, 0.0D, 14.0D / 16.0D, 1.0D / 16.0D); // tessellator.addVertexWithUV(3.25D, 0.5D, 0.0D, 16.0D / 16.0D, 3.0D / 16.0D); // tessellator.addVertexWithUV(-3.25D, 0.5D, 0.0D, 3.0D / 16.0D, 16.0D / 16.0D); // tessellator.draw(); } GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); }
From source file:com.kegare.caveworld.client.gui.GuiRegeneration.java
License:Minecraft Mod Public
@Override public void drawScreen(int mouseX, int mouseY, float ticks) { drawGradientRect(0, 0, width, height, Integer.MIN_VALUE, Integer.MAX_VALUE); GL11.glPushMatrix();// w ww . java 2 s.co m GL11.glScalef(1.5F, 1.5F, 1.5F); drawCenteredString(fontRendererObj, I18n.format("caveworld.regenerate.gui.title"), width / 3, 30, 0xFFFFFF); GL11.glPopMatrix(); drawCenteredString(fontRendererObj, I18n.format("caveworld.regenerate.gui.info"), width / 2, 90, 0xEEEEEE); super.drawScreen(mouseX, mouseY, ticks); if (backupHoverChecker.checkHover(mouseX, mouseY)) { func_146283_a(fontRendererObj.listFormattedStringToWidth( I18n.format("caveworld.regenerate.gui.backup.tooltip"), 300), mouseX, mouseY); } }