List of usage examples for org.lwjgl.opengl GL11 glColorMask
public static void glColorMask(@NativeType("GLboolean") boolean red, @NativeType("GLboolean") boolean green, @NativeType("GLboolean") boolean blue, @NativeType("GLboolean") boolean alpha)
From source file:org.terasology.logic.world.Chunk.java
License:Apache License
public void executeOcclusionQuery() { GL11.glColorMask(false, false, false, false); GL11.glDepthMask(false);// w w w . j a v a 2 s . co m if (_activeMeshes != null) { for (int j = 0; j < VERTICAL_SEGMENTS; j++) { if (!isSubMeshEmpty(j)) { if (_queries[j] == 0) { _queries[j] = GL15.glGenQueries(); GL15.glBeginQuery(GL15.GL_SAMPLES_PASSED, _queries[j]); getSubMeshAABB(j).renderSolid(); GL15.glEndQuery(GL15.GL_SAMPLES_PASSED); } } } } GL11.glColorMask(true, true, true, true); GL11.glDepthMask(true); }
From source file:playn.java.JavaGL20.java
License:Apache License
@Override public void glColorMask(boolean red, boolean green, boolean blue, boolean alpha) { GL11.glColorMask(red, green, blue, alpha); }
From source file:processing.lwjgl.PGL.java
License:Open Source License
public void colorMask(boolean wr, boolean wg, boolean wb, boolean wa) { GL11.glColorMask(wr, wg, wb, wa); }
From source file:processing.lwjgl.PLWJGL.java
License:Open Source License
public void colorMask(boolean r, boolean g, boolean b, boolean a) { GL11.glColorMask(r, g, b, a); }
From source file:processing.opengl.PLWJGL.java
License:Open Source License
@Override public void colorMask(boolean r, boolean g, boolean b, boolean a) { GL11.glColorMask(r, g, b, a); }
From source file:tectonicus.rasteriser.lwjgl.LwjglRasteriser.java
License:BSD License
@Override public void resetState() { GL11.glColorMask(true, true, true, true); GL11.glDepthFunc(GL11.GL_LEQUAL);//from w w w . j av a 2s. c om GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glCullFace(GL11.GL_BACK); GL11.glFrontFace(GL11.GL_CW); GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_ALPHA_TEST); }
From source file:tectonicus.rasteriser.lwjgl.LwjglRasteriser.java
License:BSD License
@Override public void enableColourWriting(final boolean colourMask, final boolean alphaMask) { GL11.glColorMask(colourMask, colourMask, colourMask, alphaMask); }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static void glColorMask(boolean a, boolean b, boolean c, boolean d) { GL11.glColorMask(a, b, c, d); }
From source file:wanion.avaritiaddons.block.chest.infinity.GuiInfinityChest.java
License:Mozilla Public License
@Override public void drawScreen(final int mouseX, final int mouseY, final float partialTick) { drawDefaultBackground();/* w w w.j a v a 2 s . c o m*/ drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); GL11.glDisable(GL12.GL_RESCALE_NORMAL); RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); for (Object aButtonList : buttonList) ((GuiButton) aButtonList).drawButton(mc, mouseX, mouseY); for (Object aLabelList : labelList) ((GuiLabel) aLabelList).func_146159_a(mc, mouseX, mouseY); RenderHelper.enableGUIStandardItemLighting(); GL11.glPushMatrix(); GL11.glTranslatef((float) guiLeft, (float) guiTop, 0.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(GL12.GL_RESCALE_NORMAL); Slot theSlot = null; 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 k1; for (int i1 = 0; i1 < inventorySlots.inventorySlots.size(); ++i1) { Slot slot = (Slot) inventorySlots.inventorySlots.get(i1); drawSlot(slot); if (isMouseOverSlot(slot, mouseX, mouseY) && slot.func_111238_b()) { theSlot = slot; GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); int j1 = slot.xDisplayPosition; k1 = slot.yDisplayPosition; GL11.glColorMask(true, true, true, false); drawGradientRect(j1, k1, j1 + 16, k1 + 16, -2130706433, -2130706433); GL11.glColorMask(true, true, true, true); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); } } //Forge: Force lighting to be disabled as there are some issue where lighting would //incorrectly be applied based on items that are in the inventory. GL11.glDisable(GL11.GL_LIGHTING); drawGuiContainerForegroundLayer(mouseX, mouseY); GL11.glEnable(GL11.GL_LIGHTING); InventoryPlayer inventoryplayer = mc.thePlayer.inventory; ItemStack itemstack = draggedStack == null ? inventoryplayer.getItemStack() : draggedStack; if (itemstack != null) { byte b0 = 8; k1 = draggedStack == null ? 8 : 16; String s = null; if (draggedStack != null && isRightMouseClick) { itemstack = itemstack.copy(); itemstack.stackSize = MathHelper.ceiling_float_int((float) itemstack.stackSize / 2.0F); } else if (field_147007_t && field_147008_s.size() > 1) { itemstack = itemstack.copy(); itemstack.stackSize = field_146996_I; if (itemstack.stackSize == 0) { s = "" + EnumChatFormatting.YELLOW + "0"; } } drawItemStack(itemstack, mouseX - guiLeft - b0, mouseY - guiTop - k1, s); } if (returningStack != null) { float f1 = (float) (Minecraft.getSystemTime() - returningStackTime) / 100.0F; if (f1 >= 1.0F) { f1 = 1.0F; returningStack = null; } k1 = returningStackDestSlot.xDisplayPosition - field_147011_y; int j2 = returningStackDestSlot.yDisplayPosition - field_147010_z; int l1 = field_147011_y + (int) ((float) k1 * f1); int i2 = field_147010_z + (int) ((float) j2 * f1); drawItemStack(returningStack, l1, i2, null); } GL11.glPopMatrix(); if (inventoryplayer.getItemStack() == null && theSlot != null && theSlot.getHasStack()) { ItemStack itemstack1 = theSlot.getStack(); renderToolTip(itemstack1, mouseX, mouseY); } GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); RenderHelper.enableStandardItemLighting(); }