List of usage examples for org.lwjgl.opengl GL11 glPopAttrib
public static native void glPopAttrib();
From source file:zeldaswordskills.client.render.item.RenderItemBombBag.java
License:Open Source License
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type == ItemRenderType.INVENTORY) { Tessellator tessellator = Tessellator.instance; GL11.glPushMatrix();//from w w w. j a v a2 s . c o m GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); zLevel = 50.0F; for (int i = 0; i < 3; ++i) { if (i > 0) { zLevel = 100.0F; } IIcon icon = item.getItem().getIcon(item, i); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(0, 16, zLevel, icon.getMinU(), icon.getMaxV()); tessellator.addVertexWithUV(16, 16, zLevel, icon.getMaxU(), icon.getMaxV()); tessellator.addVertexWithUV(16, 0, zLevel, icon.getMaxU(), icon.getMinV()); tessellator.addVertexWithUV(0, 0, zLevel, icon.getMinU(), icon.getMinV()); tessellator.draw(); } GL11.glPopAttrib(); GL11.glPopMatrix(); } }
From source file:zildo.fwk.opengl.compatibility.FBOHardware.java
License:Open Source License
@Override public void endRendering() { EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, 0); GL11.glPopAttrib(); }