Class GLSLIncludeResult

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class GLSLIncludeResult extends Struct<GLSLIncludeResult> implements NativeResource

 struct glsl_include_result_t {
     char const * header_name;
     char const * header_data;
     size_t header_length;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • HEADER_NAME

      public static final int HEADER_NAME
      The struct member offsets.
    • HEADER_DATA

      public static final int HEADER_DATA
      The struct member offsets.
    • HEADER_LENGTH

      public static final int HEADER_LENGTH
      The struct member offsets.
  • Constructor Details

    • GLSLIncludeResult

      public GLSLIncludeResult(ByteBuffer container)
      Creates a GLSLIncludeResult instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<GLSLIncludeResult>
    • header_name

      public @Nullable ByteBuffer header_name()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the header_name field.
    • header_nameString

      public @Nullable String header_nameString()
      Returns:
      the null-terminated string pointed to by the header_name field.
    • header_data

      public @Nullable ByteBuffer header_data()
      Returns:
      a ByteBuffer view of the data pointed to by the header_data field.
    • header_length

      public long header_length()
      Returns:
      the value of the header_length field.
    • header_name

      public GLSLIncludeResult header_name(@Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the header_name field.
    • header_data

      public GLSLIncludeResult header_data(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the header_data field.
    • header_length

      public GLSLIncludeResult header_length(long value)
      Sets the specified value to the header_length field.
    • set

      public GLSLIncludeResult set(@Nullable ByteBuffer header_name, @Nullable ByteBuffer header_data, long header_length)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static GLSLIncludeResult malloc()
      Returns a new GLSLIncludeResult instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static GLSLIncludeResult calloc()
      Returns a new GLSLIncludeResult instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static GLSLIncludeResult create()
      Returns a new GLSLIncludeResult instance allocated with BufferUtils.
    • create

      public static GLSLIncludeResult create(long address)
      Returns a new GLSLIncludeResult instance for the specified memory address.
    • createSafe

      public static @Nullable GLSLIncludeResult createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static GLSLIncludeResult.Buffer malloc(int capacity)
      Returns a new GLSLIncludeResult.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static GLSLIncludeResult.Buffer calloc(int capacity)
      Returns a new GLSLIncludeResult.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static GLSLIncludeResult.Buffer create(int capacity)
      Returns a new GLSLIncludeResult.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static GLSLIncludeResult.Buffer create(long address, int capacity)
      Create a GLSLIncludeResult.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable GLSLIncludeResult.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static GLSLIncludeResult malloc(MemoryStack stack)
      Returns a new GLSLIncludeResult instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static GLSLIncludeResult calloc(MemoryStack stack)
      Returns a new GLSLIncludeResult instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static GLSLIncludeResult.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new GLSLIncludeResult.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static GLSLIncludeResult.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new GLSLIncludeResult.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nheader_name

      public static @Nullable ByteBuffer nheader_name(long struct)
      Unsafe version of header_name().
    • nheader_nameString

      public static @Nullable String nheader_nameString(long struct)
      Unsafe version of header_nameString().
    • nheader_data

      public static @Nullable ByteBuffer nheader_data(long struct)
      Unsafe version of header_data.
    • nheader_length

      public static long nheader_length(long struct)
      Unsafe version of header_length().
    • nheader_name

      public static void nheader_name(long struct, @Nullable ByteBuffer value)
      Unsafe version of header_name.
    • nheader_data

      public static void nheader_data(long struct, @Nullable ByteBuffer value)
      Unsafe version of header_data.
    • nheader_length

      public static void nheader_length(long struct, long value)
      Sets the specified value to the header_length field of the specified struct.