/**
   * Entry point to C language function: <code>
   *  GLint {@native gluBuild1DMipmapLevels}(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *  data)
   * </code> <br>
   * Part of <code>GLU_VERSION_1_X</code><br>
   *
   * @param data a direct or array-backed {@link java.nio.Buffer}
   */
  private int gluBuild1DMipmapLevelsC(
      int target,
      int internalFormat,
      int width,
      int format,
      int type,
      int level,
      int base,
      int max,
      Buffer data) {

    final boolean data_is_direct = Buffers.isDirect(data);
    final long __addr_ = getGLUProcAddressTable()._addressof_gluBuild1DMipmapLevels;
    if (__addr_ == 0) {
      throw new GLException(String.format("Method \"%s\" not available", "gluBuild1DMipmapLevels"));
    }
    return dispatch_gluBuild1DMipmapLevelsC1(
        target,
        internalFormat,
        width,
        format,
        type,
        level,
        base,
        max,
        data_is_direct ? data : Buffers.getArray(data),
        data_is_direct
            ? Buffers.getDirectBufferByteOffset(data)
            : Buffers.getIndirectBufferByteOffset(data),
        data_is_direct,
        __addr_);
  }
  /**
   * Entry point to C language function: <code>
   *  GLint {@native gluScaleImage}(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *  dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid *  dataOut)
   * </code> <br>
   * Part of <code>GLU_VERSION_1_X</code><br>
   *
   * @param dataIn a direct or array-backed {@link java.nio.Buffer}
   * @param dataOut a direct or array-backed {@link java.nio.Buffer}
   */
  private int gluScaleImageC(
      int format,
      int wIn,
      int hIn,
      int typeIn,
      Buffer dataIn,
      int wOut,
      int hOut,
      int typeOut,
      Buffer dataOut) {

    final boolean dataIn_is_direct = Buffers.isDirect(dataIn);
    final boolean dataOut_is_direct = Buffers.isDirect(dataOut);
    final long __addr_ = getGLUProcAddressTable()._addressof_gluScaleImage;
    if (__addr_ == 0) {
      throw new GLException(String.format("Method \"%s\" not available", "gluScaleImage"));
    }
    return dispatch_gluScaleImageC1(
        format,
        wIn,
        hIn,
        typeIn,
        dataIn_is_direct ? dataIn : Buffers.getArray(dataIn),
        dataIn_is_direct
            ? Buffers.getDirectBufferByteOffset(dataIn)
            : Buffers.getIndirectBufferByteOffset(dataIn),
        dataIn_is_direct,
        wOut,
        hOut,
        typeOut,
        dataOut_is_direct ? dataOut : Buffers.getArray(dataOut),
        dataOut_is_direct
            ? Buffers.getDirectBufferByteOffset(dataOut)
            : Buffers.getIndirectBufferByteOffset(dataOut),
        dataOut_is_direct,
        __addr_);
  }
Exemplo n.º 3
0
 static long createBGRA8888Icon0(
     final Buffer pixels,
     final int width,
     final int height,
     final boolean isCursor,
     final int hotX,
     final int hotY) {
   if (null == pixels) {
     throw new IllegalArgumentException("data buffer/size");
   }
   final boolean pixels_is_direct = Buffers.isDirect(pixels);
   return createBGRA8888Icon0(
       pixels_is_direct ? pixels : Buffers.getArray(pixels),
       pixels_is_direct
           ? Buffers.getDirectBufferByteOffset(pixels)
           : Buffers.getIndirectBufferByteOffset(pixels),
       pixels_is_direct,
       width,
       height,
       isCursor,
       hotX,
       hotY);
 }