protected int setPixieBrightness(EntityPixie par1EntityPixie, int par2, float par3) { if (par2 != 0) return -1; else { bindTexture(getEntityTexture(par1EntityPixie)); float f1 = 1.0F; GlStateManager.enableBlend(); GlStateManager.disableAlpha(); GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE); if (par1EntityPixie.isInvisible()) GlStateManager.depthMask(false); else GlStateManager.depthMask(true); char c0 = 61680; int j = c0 % 65536; int k = c0 / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, f1); return 1; } }
public static void dispatch() { Tessellator tessellator = Tessellator.getInstance(); Profiler profiler = Minecraft.getMinecraft().profiler; GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GlStateManager.depthMask(false); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE); GlStateManager.alphaFunc(GL11.GL_GREATER, 0.003921569F); GlStateManager.disableLighting(); profiler.startSection("sparkle"); FXSparkle.dispatchQueuedRenders(tessellator); profiler.endStartSection("wisp"); FXWisp.dispatchQueuedRenders(tessellator); profiler.endSection(); GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F); GlStateManager.disableBlend(); GlStateManager.depthMask(true); GL11.glPopAttrib(); }
GlStateManager.disableAlpha(); GlStateManager.disableBlend(); GlStateManager.depthMask( false ); GlStateManager.color( 0.0f, 0.0f, 0.0f, 1.0f ); final Tessellator tessellator = Tessellator.getInstance(); GlStateManager.depthMask( true ); GlStateManager.enableBlend(); GlStateManager.disableTexture2D(); GlStateManager.depthMask( false ); OpenGlHelper.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0 ); GlStateManager.depthMask( true ); GlStateManager.enableBlend(); GlStateManager.enableAlpha();
GL11.glEnable(GL11.GL_STENCIL_TEST); GlStateManager.colorMask(false, false, false, false); GlStateManager.depthMask(false); GL11.glStencilFunc(GL11.GL_NEVER, 1, 0xFF); GL11.glStencilOp(GL11.GL_REPLACE, GL11.GL_KEEP, GL11.GL_KEEP); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GlStateManager.colorMask(true, true, true, true); GlStateManager.depthMask(true); GL11.glStencilMask(0x00); GL11.glStencilFunc(GL11.GL_EQUAL, 1, 0xFF);
private void endMask() { GlStateManager.depthFunc(GL_LEQUAL); GlStateManager.depthMask(true); GlStateManager.disableDepth(); }
public static void endDepthMask() { GlStateManager.depthFunc(GL_LEQUAL); GlStateManager.depthMask(true); GlStateManager.disableDepth(); }
private static void setGlStateForPass(@Nonnull BlockRenderLayer layer) { GlStateManager.color(1, 1, 1); if (layer != BlockRenderLayer.TRANSLUCENT) { GlStateManager.enableDepth(); GlStateManager.disableBlend(); GlStateManager.depthMask(true); } else { GlStateManager.enableBlend(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GlStateManager.depthMask(false); } }
GlStateManager.disableLighting(); GlStateManager.translate(0.0F, 0F / f1, 0.0F); GlStateManager.depthMask(false); GlStateManager.enableBlend(); OpenGlHelper.glBlendFunc(770, 771, 1, 0); tessellator.draw(); GlStateManager.enableTexture2D(); GlStateManager.depthMask(true); mc.fontRenderer.drawString(potato.name, -mc.fontRenderer.getStringWidth(potato.name) / 2, 0, 0xFFFFFF); if (name.equals("pahimar") || name.equals("soaryn")) { GlStateManager.translate(0F, 14F, 0F); String str = name.equals("pahimar") ? "[WIP]" : "(soon)"; GlStateManager.depthMask(false); GlStateManager.enableBlend(); OpenGlHelper.glBlendFunc(770, 771, 1, 0); tessellator.draw(); GlStateManager.enableTexture2D(); GlStateManager.depthMask(true); mc.fontRenderer.drawString(str, -mc.fontRenderer.getStringWidth(str) / 2, 0, 0xFFFFFF);
@Override public void clean() { GlStateManager.disableBlend(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.depthMask(true); GlStateManager.color(1F, 1F, 1F, 1F); } };
public static void endStencil() { glStencilFunc(GL_EQUAL, 1, 0xFF); // Pass test if stencil value is 1 glStencilMask(0x00); // Don't write anything to stencil buffer GlStateManager.depthMask(true); // Write to depth buffer GlStateManager.colorMask(true, true, true, false); glDisable(GL_STENCIL_TEST); }
GlStateManager.depthMask( true );
private void postRenderDamagedBlocks() { GlStateManager.disableAlpha(); GlStateManager.doPolygonOffset(0.0F, 0.0F); GlStateManager.disablePolygonOffset(); GlStateManager.enableAlpha(); GlStateManager.depthMask(true); GlStateManager.popMatrix(); }
public static void beginStencil() { glEnable(GL_STENCIL_TEST); GlStateManager.colorMask(false, false, false, false); GlStateManager.depthMask(false); glStencilFunc(GL_ALWAYS, 1, 0xFF); // Set any stencil to 1 glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); glStencilMask(0xFF); // Write to stencil buffer GlStateManager.clear(GL_STENCIL_BUFFER_BIT); }
public static void beginDrawingDepthMask() { GlStateManager.clear(GL_DEPTH_BUFFER_BIT); GlStateManager.clearDepth(1f); GlStateManager.depthFunc(GL_LESS); GlStateManager.enableDepth(); GlStateManager.depthMask(true); GlStateManager.colorMask(false, false, false, false); GlStateManager.disableTexture2D(); }
public static void renderStack(int x, int y, ItemStack stack, float opacity) { if (!StackUtils.isNullOrEmpty(stack)) { GlStateManager.color(1, 1, 1); GlStateManager.disableCull(); GlStateManager.depthMask(true); RenderHelper.enableGUIStandardItemLighting(); renderItem.renderItemIntoGUI(stack, x, y); RenderHelper.disableStandardItemLighting(); GlStateManager.enableCull(); } }
public static void finishRender(BufferBuilder buffer) { Tessellator.getInstance().draw(); buffer.setTranslation(0, 0, 0); GL14.glBlendEquation(GL14.GL_FUNC_ADD); GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); GlStateManager.depthMask(true); GL11.glDisable(GL_POLYGON_OFFSET_FILL); GlStateManager.enableDepth(); GlStateManager.enableTexture2D(); }
private static void finishBreaking() { GlStateManager.disableAlpha(); GlStateManager.doPolygonOffset(0.0F, 0.0F); GlStateManager.disablePolygonOffset(); GlStateManager.enableAlpha(); GlStateManager.depthMask(true); GlStateManager.popMatrix(); Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); }