public void clearClipRect() {
    if (context.clipRectEnabled) {
      glDisable(GL_SCISSOR_TEST);
      context.clipRectEnabled = false;

      clipX = 0;
      clipY = 0;
      clipW = 0;
      clipH = 0;
    }
  }
  public void clearClipRect() {
    GL gl = GLContext.getCurrentGL();
    if (context.clipRectEnabled) {
      gl.glDisable(GL.GL_SCISSOR_TEST);
      context.clipRectEnabled = false;

      clipX = 0;
      clipY = 0;
      clipW = 0;
      clipH = 0;
    }
  }
 public void setClipRect(int x, int y, int width, int height) {
   if (!context.clipRectEnabled) {
     glEnable(GL_SCISSOR_TEST);
     context.clipRectEnabled = true;
   }
   if (clipX != x || clipY != y || clipW != width || clipH != height) {
     glScissor(x, y, width, height);
     clipX = x;
     clipY = y;
     clipW = width;
     clipH = height;
   }
 }