private static void enableDepthTest(final boolean enable, final ZBufferStateRecord record) { if (enable && (!record.depthTest || !record.isValid())) { GL11C.glEnable(GL11C.GL_DEPTH_TEST); record.depthTest = true; } else if (!enable && (record.depthTest || !record.isValid())) { GL11C.glDisable(GL11C.GL_DEPTH_TEST); record.depthTest = false; } }
@Override public StateRecord createStateRecord(final ContextCapabilities caps) { return new ZBufferStateRecord(); } }
private static void enableWrite(final boolean enable, final ZBufferStateRecord record) { if (enable != record.writable || !record.isValid()) { GL11.glDepthMask(enable); record.writable = enable; } } }
@Override public StateRecord createStateRecord(final ContextCapabilities caps) { return new ZBufferStateRecord(); } }
private static void enableDepthTest(final boolean enable, final ZBufferStateRecord record) { if (enable && (!record.depthTest || !record.isValid())) { GL11.glEnable(GL11.GL_DEPTH_TEST); record.depthTest = true; } else if (!enable && (record.depthTest || !record.isValid())) { GL11.glDisable(GL11.GL_DEPTH_TEST); record.depthTest = false; } }
private static void applyFunction(final int depthFunc, final ZBufferStateRecord record) { if (depthFunc != record.depthFunc || !record.isValid()) { GL11.glDepthFunc(depthFunc); record.depthFunc = depthFunc; } }
private static void applyFunction(final int depthFunc, final ZBufferStateRecord record) { if (depthFunc != record.depthFunc || !record.isValid()) { GL11C.glDepthFunc(depthFunc); record.depthFunc = depthFunc; } }
private static void enableWrite(final boolean enable, final ZBufferStateRecord record) { if (enable != record.writable || !record.isValid()) { GL11C.glDepthMask(enable); record.writable = enable; } } }
private static void enableDepthTest(final boolean enable, final ZBufferStateRecord record) { final GL gl = GLContext.getCurrentGL(); if (enable && (!record.depthTest || !record.isValid())) { gl.glEnable(GL.GL_DEPTH_TEST); record.depthTest = true; } else if (!enable && (record.depthTest || !record.isValid())) { gl.glDisable(GL.GL_DEPTH_TEST); record.depthTest = false; } }
private static void enableWrite(final boolean enable, final ZBufferStateRecord record) { final GL gl = GLU.getCurrentGL(); if (enable != record.writable || !record.isValid()) { gl.glDepthMask(enable); record.writable = enable; } } }
private static void applyFunction(final int depthFunc, final ZBufferStateRecord record) { final GL gl = GLU.getCurrentGL(); if (depthFunc != record.depthFunc || !record.isValid()) { gl.glDepthFunc(depthFunc); record.depthFunc = depthFunc; } }