* @param the command length
   *
   * @return the output stream
   */
  private void begin_render_request (RequestOutputStream o, int opcode,
                                     int length) {

    synchronized (o) {
      if (o.index == 0             // No request started so far.
          || o.opcode () != 1      // Wrong opcode.
          || ! o.fits (length)) {  // Doesn't fit.
        o.begin_request (glx.major_opcode, 1, 2 + length / 4);
        o.write_int32 (tag);
      }
      o.write_int16 (length);
      o.write_int16 (opcode);
    }
  }