*/
  public void lightiv (int light, int pname, int [] params) {
    int n = 0;

    switch (pname) {
    case SPOT_EXPONENT:         // fall through
    case SPOT_CUTOFF:           // fall through
    case CONSTANT_ATTENUATION:  // fall through
    case LINEAR_ATTENUATION:    // fall through
    case QUADRATIC_ATTENUATION: n = 1; break;
    case SPOT_DIRECTION: n = 3; break;
    case AMBIENT:               // fall through
    case DIFFUSE:               // fall through
    case SPECULAR:              // fall through
    case POSITION: n = 4; break;
    }
    
    RequestOutputStream o = display.out;
    synchronized (o) {
      begin_render_request (o, 89, 12 + 4 * n);
      o.write_int32 (light);
      o.write_int32 (pname);
      for (int i = 0; i < n; i++)
        o.write_int32 (params [i]);
    }
  }