예제 #1
0
 public static void setClippingEnabled(final RendererRecord rendRecord, final boolean enabled) {
   if (enabled && (!rendRecord.isClippingTestValid() || !rendRecord.isClippingTestEnabled())) {
     GL11.glEnable(GL11.GL_SCISSOR_TEST);
     rendRecord.setClippingTestEnabled(true);
   } else if (!enabled
       && (!rendRecord.isClippingTestValid() || rendRecord.isClippingTestEnabled())) {
     GL11.glDisable(GL11.GL_SCISSOR_TEST);
     rendRecord.setClippingTestEnabled(false);
   }
   rendRecord.setClippingTestValid(true);
 }
예제 #2
-1
  public static void setClippingEnabled(final RendererRecord rendRecord, final boolean enabled) {
    final GL gl = GLContext.getCurrentGL();

    if (enabled && (!rendRecord.isClippingTestValid() || !rendRecord.isClippingTestEnabled())) {
      gl.glEnable(GL.GL_SCISSOR_TEST);
      rendRecord.setClippingTestEnabled(true);
    } else if (!enabled
        && (!rendRecord.isClippingTestValid() || rendRecord.isClippingTestEnabled())) {
      gl.glDisable(GL.GL_SCISSOR_TEST);
      rendRecord.setClippingTestEnabled(false);
    }
    rendRecord.setClippingTestValid(true);
  }