void unbind() { GL11.glPopAttrib(); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glPopMatrix(); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPopMatrix(); if (lightmapEnabled) { GL13.glActiveTexture(GL13.GL_TEXTURE1); GL11.glEnable(GL11.GL_TEXTURE_2D); GL13.glActiveTexture(GL13.GL_TEXTURE0); } GL11.glEnable(GL11.GL_BLEND); GLAPI.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, 0); }
void bind() { EXTFramebufferObject.glBindFramebufferEXT( EXTFramebufferObject.GL_FRAMEBUFFER_EXT, frameBuffer); GL11.glPushAttrib(glAttributes); GL11.glViewport(x0, y0, width, height); GL11.glEnable(GL11.GL_SCISSOR_TEST); GL11.glScissor(x0, y0, width, height); lightmapEnabled = false; if (gl13Supported) { GL13.glActiveTexture(GL13.GL_TEXTURE1); lightmapEnabled = GL11.glIsEnabled(GL11.GL_TEXTURE_2D); if (lightmapEnabled) { GL11.glDisable(GL11.GL_TEXTURE_2D); } GL13.glActiveTexture(GL13.GL_TEXTURE0); } GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_DEPTH_TEST); GLAPI.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_ALPHA_TEST); GLAPI.glAlphaFunc(GL11.GL_GREATER, 0.01f); if (useGL13) { GL11.glDisable(GL13.GL_MULTISAMPLE); } GLAPI.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glPushMatrix(); GL11.glLoadIdentity(); GL11.glOrtho(-1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPushMatrix(); GL11.glLoadIdentity(); }
@Override public void renderContentLayer(int localWidth, int localHeight, boolean isTranslatable) { String tStation = StatCollector.translateToLocal("manual.page.modifier1"); if (icons.length > 3) tStation = StatCollector.translateToLocal("manual.page.modifier2"); if (icons.length > 4) tStation = StatCollector.translateToLocal("manual.page.modifier3"); if (isTranslatable) tStation = StatCollector.translateToLocal(tStation); manual.fonts.drawString("\u00a7n" + tStation, localWidth + 60, localHeight + 4, 0); GL11.glScalef(2f, 2f, 2f); GL11.glEnable(GL12.GL_RESCALE_NORMAL); RenderHelper.enableGUIStandardItemLighting(); ItemStack toolstack = MantleClientRegistry.getManualIcon("ironpick"); if (type.equals("weapon")) toolstack = MantleClientRegistry.getManualIcon("ironlongsword"); if (type.equals("travelgoggles")) toolstack = MantleClientRegistry.getManualIcon("travelgoggles"); if (type.equals("travelvest")) toolstack = MantleClientRegistry.getManualIcon("travelvest"); if (type.equals("travelwings")) toolstack = MantleClientRegistry.getManualIcon("travelwings"); if (type.equals("travelboots")) toolstack = MantleClientRegistry.getManualIcon("travelboots"); if (type.equals("travelbelt")) toolstack = MantleClientRegistry.getManualIcon("travelbelt"); if (type.equals("travelglove")) toolstack = MantleClientRegistry.getManualIcon("travelglove"); if (type.equals("travelmulti")) toolstack = toolMulti[counter]; // update displayed item if (iconsMulti != null && iconsMulti.length > 0 && type.equals("travelmulti") && System.currentTimeMillis() - lastUpdate > 1000) { lastUpdate = System.currentTimeMillis(); counter++; if (counter >= iconsMulti.length) counter = 0; icons = iconsMulti[counter]; toolstack = toolMulti[counter]; } manual.renderitem.zLevel = 100; if (icons.length < 4) { manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, toolstack, (localWidth + 54) / 2, (localHeight + 54) / 2); manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[0], (localWidth + 130) / 2, (localHeight + 54) / 2); manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[1], (localWidth + 18) / 2, (localHeight + 36) / 2); if (icons[2] != null) manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[2], (localWidth + 18) / 2, (localHeight + 74) / 2); } else { manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, toolstack, (localWidth + 74) / 2, (localHeight + 54) / 2); manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[0], (localWidth + 140) / 2, (localHeight + 54) / 2); manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[1], (localWidth - 2) / 2, (localHeight + 36) / 2); manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[2], (localWidth - 2) / 2, (localHeight + 74) / 2); manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[3], (localWidth + 36) / 2, (localHeight + 36) / 2); if (icons[4] != null) manual.renderitem.renderItemAndEffectIntoGUI( manual.fonts, manual.getMC().renderEngine, icons[4], (localWidth + 36) / 2, (localHeight + 74) / 2); } manual.renderitem.zLevel = 0; GL11.glScalef(0.5F, 0.5F, 0.5F); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); }