List of usage examples for org.lwjgl.opengl GL11 glDisable
public static void glDisable(@NativeType("GLenum") int target)
From source file:appeng.entity.RenderTinyTNTPrimed.java
License:Open Source License
private void renderPrimedTNT(final EntityTinyTNTPrimed tnt, final double x, final double y, final double z, final float life) { GL11.glPushMatrix();//from w w w .j ava 2s .c o m GL11.glTranslatef((float) x, (float) y - 0.25f, (float) z); float f2; if (tnt.fuse - life + 1.0F < 10.0F) { f2 = 1.0F - (tnt.fuse - life + 1.0F) / 10.0F; if (f2 < 0.0F) { f2 = 0.0F; } if (f2 > 1.0F) { f2 = 1.0F; } f2 *= f2; f2 *= f2; final float f3 = 1.0F + f2 * 0.3F; GL11.glScalef(f3, f3, f3); } GL11.glScalef(0.5f, 0.5f, 0.5f); f2 = (1.0F - (tnt.fuse - life + 1.0F) / 100.0F) * 0.8F; this.bindEntityTexture(tnt); this.blockRenderer.renderBlockAsItem(Blocks.tnt, 0, tnt.getBrightness(life)); if (tnt.fuse / 5 % 2 == 0) { GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, f2); this.blockRenderer.renderBlockAsItem(Blocks.tnt, 0, 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); } GL11.glPopMatrix(); }
From source file:appeng.parts.reporting.AbstractPartMonitor.java
License:Open Source License
private void tesrRenderScreen(final Tessellator tess, final IAEItemStack ais) { // GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS ); final ForgeDirection d = this.getSide(); GL11.glTranslated(d.offsetX * 0.77, d.offsetY * 0.77, d.offsetZ * 0.77); switch (d) {/*from w w w . java 2 s. com*/ case UP: GL11.glScalef(1.0f, -1.0f, 1.0f); GL11.glRotatef(90.0f, 1.0f, 0.0f, 0.0f); GL11.glRotatef(this.getSpin() * 90.0F, 0, 0, 1); break; case DOWN: GL11.glScalef(1.0f, -1.0f, 1.0f); GL11.glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); GL11.glRotatef(this.getSpin() * -90.0F, 0, 0, 1); break; case EAST: GL11.glScalef(-1.0f, -1.0f, -1.0f); GL11.glRotatef(-90.0f, 0.0f, 1.0f, 0.0f); break; case WEST: GL11.glScalef(-1.0f, -1.0f, -1.0f); GL11.glRotatef(90.0f, 0.0f, 1.0f, 0.0f); break; case NORTH: GL11.glScalef(-1.0f, -1.0f, -1.0f); break; case SOUTH: GL11.glScalef(-1.0f, -1.0f, -1.0f); GL11.glRotatef(180.0f, 0.0f, 1.0f, 0.0f); break; default: break; } try { final ItemStack sis = ais.getItemStack(); sis.stackSize = 1; final int br = 16 << 20 | 16 << 4; final int var11 = br % 65536; final int var12 = br / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, var11 * 0.8F, var12 * 0.8F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL12.GL_RESCALE_NORMAL); // RenderHelper.enableGUIStandardItemLighting(); tess.setColorOpaque_F(1.0f, 1.0f, 1.0f); ClientHelper.proxy.doRenderItem(sis, this.getTile().getWorldObj()); } catch (final Exception e) { AELog.error(e); } finally { GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); } GL11.glTranslatef(0.0f, 0.14f, -0.24f); GL11.glScalef(1.0f / 62.0f, 1.0f / 62.0f, 1.0f / 62.0f); final long stackSize = ais.getStackSize(); final String renderedStackSize = NUMBER_CONVERTER.toWideReadableForm(stackSize); final FontRenderer fr = Minecraft.getMinecraft().fontRenderer; final int width = fr.getStringWidth(renderedStackSize); GL11.glTranslatef(-0.5f * width, 0.0f, -1.0f); fr.drawString(renderedStackSize, 0, 0, 0); // GL11.glPopAttrib(); }
From source file:appeng.parts.reporting.PartStorageMonitor.java
License:Open Source License
private void tesrRenderScreen(Tessellator tess, IAEItemStack ais) { GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); ForgeDirection d = this.side; GL11.glTranslated(d.offsetX * 0.77, d.offsetY * 0.77, d.offsetZ * 0.77); if (d == ForgeDirection.UP) { GL11.glScalef(1.0f, -1.0f, 1.0f); GL11.glRotatef(90.0f, 1.0f, 0.0f, 0.0f); GL11.glRotatef(this.spin * 90.0F, 0, 0, 1); }//from www .ja v a2s. c o m if (d == ForgeDirection.DOWN) { GL11.glScalef(1.0f, -1.0f, 1.0f); GL11.glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); GL11.glRotatef(this.spin * -90.0F, 0, 0, 1); } if (d == ForgeDirection.EAST) { GL11.glScalef(-1.0f, -1.0f, -1.0f); GL11.glRotatef(-90.0f, 0.0f, 1.0f, 0.0f); } if (d == ForgeDirection.WEST) { GL11.glScalef(-1.0f, -1.0f, -1.0f); GL11.glRotatef(90.0f, 0.0f, 1.0f, 0.0f); } if (d == ForgeDirection.NORTH) { GL11.glScalef(-1.0f, -1.0f, -1.0f); } if (d == ForgeDirection.SOUTH) { GL11.glScalef(-1.0f, -1.0f, -1.0f); GL11.glRotatef(180.0f, 0.0f, 1.0f, 0.0f); } GL11.glPushMatrix(); try { ItemStack sis = ais.getItemStack(); sis.stackSize = 1; int br = 16 << 20 | 16 << 4; int var11 = br % 65536; int var12 = br / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, var11 * 0.8F, var12 * 0.8F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL12.GL_RESCALE_NORMAL); // RenderHelper.enableGUIStandardItemLighting(); tess.setColorOpaque_F(1.0f, 1.0f, 1.0f); ClientHelper.proxy.doRenderItem(sis, this.tile.getWorldObj()); } catch (Exception e) { AELog.error(e); } GL11.glPopMatrix(); GL11.glTranslatef(0.0f, 0.14f, -0.24f); GL11.glScalef(1.0f / 62.0f, 1.0f / 62.0f, 1.0f / 62.0f); final long stackSize = ais.getStackSize(); final String renderedStackSize = NUMBER_CONVERTER.toWideReadableForm(stackSize); FontRenderer fr = Minecraft.getMinecraft().fontRenderer; int width = fr.getStringWidth(renderedStackSize); GL11.glTranslatef(-0.5f * width, 0.0f, -1.0f); fr.drawString(renderedStackSize, 0, 0, 0); GL11.glPopAttrib(); }
From source file:ar.com.quark.backend.lwjgl.opengl.DesktopGLES20.java
License:Apache License
/** * {@inheritDoc} */ @Override public void glDisable(int value) { GL11.glDisable(value); }
From source file:arekkuusu.grimoireOfAlice.client.render.ItemRenderHolyKeyStone.java
License:Open Source License
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { GL11.glPushMatrix();/*from w w w.j av a 2 s . co m*/ GL11.glTranslatef(-0.5F, -0.5F, -0.5F); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glRotatef(-5F, 1F, 0F, 0F); TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityHolyKeyStone(), 0.0D, 0.0D, 0.0D, 0.0F); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); }
From source file:arekkuusu.grimoireOfAlice.client.render.ItemRenderHolyStone.java
License:Open Source License
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { GL11.glPushMatrix();//from www .j a v a 2s . c o m GL11.glTranslatef(-0.5F, -0.5F, -0.5F); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); float s = 1.4F; GL11.glScalef(s, s, s); GL11.glRotatef(-5F, 1F, 0F, 0F); TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityHolyStone(), 0.0D, 0.0D, 0.0D, 0.0F); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); }
From source file:arekkuusu.grimoireOfAlice.client.render.ItemRenderOnbashira.java
License:Open Source License
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { GL11.glPushMatrix();//from w w w . j av a2 s . co m GL11.glTranslatef(0F, -0.7F, -0.5F); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); float s = 0.5F; GL11.glScalef(s, s, s); GL11.glRotatef(0F, 0F, 0F, 0F); TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileEntityOnbashira(), 0.0D, 0.0D, 0.0D, 0.0F); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); }
From source file:arg.RenderRecipe.java
License:Open Source License
/** * Draws the screen and all the components in it. *///from www . j a va 2 s . c om @Override public void drawScreen(int par1, int par2, float par3) { this.drawDefaultBackground(); int k = this.guiLeft; int l = this.guiTop; this.drawGuiContainerBackgroundLayer(par3, par1, par2); GL11.glDisable(GL12.GL_RESCALE_NORMAL); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); RenderHelper.enableGUIStandardItemLighting(); GL11.glPushMatrix(); GL11.glTranslatef((float) k, (float) l, 0.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(GL12.GL_RESCALE_NORMAL); short short1 = 240; short short2 = 240; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) short1 / 1.0F, (float) short2 / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int i1; // crafting result drawSlotInventory((Slot) inventorySlots.inventorySlots.get(0)); incredientList.clear(); for (int j1 = 1; j1 < inventorySlots.inventorySlots.size(); ++j1) { Slot slot = (Slot) inventorySlots.inventorySlots.get(j1); drawSlotInventory(slot); } this.drawGuiContainerForegroundLayer(par1, par2); GL11.glPopMatrix(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); RenderHelper.enableStandardItemLighting(); }
From source file:aritzh.afm.client.render.model.ModelTestModel.java
License:LGPL
public void render(final double x, final double y, final double z) { GL11.glPushMatrix();/*from w ww . java 2 s . co m*/ GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslated(x + .5, y - .5, z + .5); FMLClientHandler.instance().getClient().renderEngine .func_110577_a(new ResourceLocation(Config.MOD_ID.toLowerCase(), RenderingData.TEXTURE_TESTMODEL)); this.model.renderAll(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }
From source file:aritzh.afm.client.render.model.ModelWireless.java
License:LGPL
public void render(final double x, final double y, final double z) { GL11.glPushMatrix();//from w w w.j av a 2 s . com GL11.glDisable(GL11.GL_LIGHTING); GL11.glTranslated(x + .5, y - .5, z + .5); FMLClientHandler.instance().getClient().renderEngine .func_110577_a(new ResourceLocation(Config.MOD_ID.toLowerCase(), RenderingData.TEXTURE_WIRELESS)); this.model.renderAll(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }