List of usage examples for org.lwjgl.opengl GL11 glClipPlane
public static void glClipPlane(@NativeType("GLenum") int plane, @NativeType("GLdouble const *") double[] equation)
From source file:com.ardor3d.scene.state.lwjgl.LwjglClipStateUtil.java
License:Open Source License
private static void enableClipPlane(final int planeIndex, final boolean enable, final ClipState state, final ClipStateRecord record) { if (enable) { if (!record.isValid() || !record.planeEnabled[planeIndex]) { GL11.glEnable(GL11.GL_CLIP_PLANE0 + planeIndex); record.planeEnabled[planeIndex] = true; }/* ww w .j a va 2 s . c o m*/ record.buf.rewind(); ((DoubleBuffer) record.buf).put(state.getPlaneEquations(planeIndex)); record.buf.flip(); GL11.glClipPlane(GL11.GL_CLIP_PLANE0 + planeIndex, (DoubleBuffer) record.buf); } else { if (!record.isValid() || record.planeEnabled[planeIndex]) { GL11.glDisable(GL11.GL_CLIP_PLANE0 + planeIndex); record.planeEnabled[planeIndex] = false; } } }
From source file:com.bluepowermod.client.render.RenderHelper.java
License:Open Source License
public static void renderRedstoneTorch(double x, double y, double z, double height, boolean state, boolean digital) { GL11.glPushMatrix();/* w ww.java 2s .c om*/ { Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); if (digital) { rb.overrideBlockTexture = state ? IconSupplier.bluestoneTorchOn : IconSupplier.bluestoneTorchOff; } else { rb.overrideBlockTexture = state ? Blocks.redstone_torch.getIcon(0, 0) : Blocks.unlit_redstone_torch.getIcon(0, 0); } GL11.glEnable(GL11.GL_CLIP_PLANE0); GL11.glClipPlane(GL11.GL_CLIP_PLANE0, uk.co.qmunity.lib.client.render.RenderUtils.planeEquation(0, 1, 0)); GL11.glTranslated(x, y + height - 1, z); Tessellator t = Tessellator.instance; t.setColorOpaque_F(1.0F, 1.0F, 1.0F); t.startDrawingQuads(); { rb.setRenderBounds(7 / 16D, 0, 0, 9 / 16D, 1, 1); t.setNormal(-1, 1, 0); rb.renderFaceXNeg(Blocks.stone, 0, 0, 0, null); t.setNormal(1, 1, 0); rb.renderFaceXPos(Blocks.stone, 0, 0, 0, null); rb.setRenderBounds(0, 0, 7 / 16D, 1, 1, 9 / 16D); t.setNormal(0, 1, -1); rb.renderFaceZNeg(Blocks.stone, 0, 0, 0, null); t.setNormal(0, 1, 1); rb.renderFaceZPos(Blocks.stone, 0, 0, 0, null); rb.setRenderBounds(7 / 16D, 0, 6 / 16D, 9 / 16D, 10 / 16D, 8 / 16D); t.setNormal(0, 1, 0); rb.renderFaceYPos(Blocks.stone, 0, 0, 1 / 16D, null); } t.draw(); GL11.glDisable(GL11.GL_CLIP_PLANE0); rb.overrideBlockTexture = null; } GL11.glPopMatrix(); }
From source file:io.root.gfx.glutils.GL.java
License:Apache License
public static void glClipPlane(int plane, DoubleBuffer buffer) { GL11.glClipPlane(plane, buffer); }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static void glClipPlane(int a, DoubleBuffer b) { GL11.glClipPlane(a, b); }