Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GL11.glEnable(GL11.GL_STENCIL_TEST);
- GlStateManager.colorMask(false, false, false, false);
- GlStateManager.depthMask(false);
- GL11.glStencilMask(0xFF);
- GL11.glClearStencil(0);
- GL11.glStencilFunc(GL11.GL_NEVER, 1, 0xFF);
- GL11.glStencilOp(GL11.GL_REPLACE, GL11.GL_KEEP, GL11.GL_KEEP);
- GL11.glStencilMask(0xFF);
- GL11.glClear(GL11.GL_STENCIL_BUFFER_BIT);
- this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);
- GlStateManager.colorMask(true, true, true, true);
- GlStateManager.depthMask(true);
- GL11.glStencilMask(0x00);
- GL11.glStencilFunc(GL11.GL_EQUAL, 1, 0xFF);
- this.drawTexturedModalRect(i + 25, j, 0, 0, this.xSize, this.ySize);
- GL11.glDisable(GL11.GL_STENCIL_TEST);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement