Class GLSLangInput

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class GLSLangInput extends Struct<GLSLangInput> implements NativeResource

 struct glslang_input_t {
     glslang_source_t language;
     glslang_stage_t stage;
     glslang_client_t client;
     glslang_target_client_version_t client_version;
     glslang_target_language_t target_language;
     glslang_target_language_version_t target_language_version;
     char const * code;
     int default_version;
     glslang_profile_t default_profile;
     int force_default_version_and_profile;
     int forward_compatible;
     glslang_messages_t messages;
     glslang_resource_t const * resource;
     glsl_include_callbacks_t callbacks;
     void * callbacks_ctx;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int LANGUAGE
      The struct member offsets.
    • STAGE

      public static final int STAGE
      The struct member offsets.
    • CLIENT

      public static final int CLIENT
      The struct member offsets.
    • CLIENT_VERSION

      public static final int CLIENT_VERSION
      The struct member offsets.
    • TARGET_LANGUAGE

      public static final int TARGET_LANGUAGE
      The struct member offsets.
    • TARGET_LANGUAGE_VERSION

      public static final int TARGET_LANGUAGE_VERSION
      The struct member offsets.
    • CODE

      public static final int CODE
      The struct member offsets.
    • DEFAULT_VERSION

      public static final int DEFAULT_VERSION
      The struct member offsets.
    • DEFAULT_PROFILE

      public static final int DEFAULT_PROFILE
      The struct member offsets.
    • FORCE_DEFAULT_VERSION_AND_PROFILE

      public static final int FORCE_DEFAULT_VERSION_AND_PROFILE
      The struct member offsets.
    • FORWARD_COMPATIBLE

      public static final int FORWARD_COMPATIBLE
      The struct member offsets.
    • MESSAGES

      public static final int MESSAGES
      The struct member offsets.
    • RESOURCE

      public static final int RESOURCE
      The struct member offsets.
    • CALLBACKS

      public static final int CALLBACKS
      The struct member offsets.
    • CALLBACKS_CTX

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

    • GLSLangInput

      public GLSLangInput(ByteBuffer container)
      Creates a GLSLangInput 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<GLSLangInput>
    • language

      public int language()
      Returns:
      the value of the language field.
    • stage

      public int stage()
      Returns:
      the value of the stage field.
    • client

      public int client()
      Returns:
      the value of the client field.
    • client_version

      public int client_version()
      Returns:
      the value of the client_version field.
    • target_language

      public int target_language()
      Returns:
      the value of the target_language field.
    • target_language_version

      public int target_language_version()
      Returns:
      the value of the target_language_version field.
    • code

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

      public @Nullable String codeString()
      Returns:
      the null-terminated string pointed to by the code field.
    • default_version

      public int default_version()
      Returns:
      the value of the default_version field.
    • default_profile

      public int default_profile()
      Returns:
      the value of the default_profile field.
    • force_default_version_and_profile

      public boolean force_default_version_and_profile()
      Returns:
      the value of the force_default_version_and_profile field.
    • forward_compatible

      public boolean forward_compatible()
      Returns:
      the value of the forward_compatible field.
    • messages

      public int messages()
      Returns:
      the value of the messages field.
    • resource

      public @Nullable GLSLangResource resource()
      Returns:
      a GLSLangResource view of the struct pointed to by the resource field.
    • callbacks

      public GLSLIncludeCallbacks callbacks()
      Returns:
      a GLSLIncludeCallbacks view of the callbacks field.
    • callbacks_ctx

      public long callbacks_ctx()
      Returns:
      the value of the callbacks_ctx field.
    • language

      public GLSLangInput language(int value)
      Sets the specified value to the language field.
    • stage

      public GLSLangInput stage(int value)
      Sets the specified value to the stage field.
    • client

      public GLSLangInput client(int value)
      Sets the specified value to the client field.
    • client_version

      public GLSLangInput client_version(int value)
      Sets the specified value to the client_version field.
    • target_language

      public GLSLangInput target_language(int value)
      Sets the specified value to the target_language field.
    • target_language_version

      public GLSLangInput target_language_version(int value)
      Sets the specified value to the target_language_version field.
    • code

      public GLSLangInput code(@Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the code field.
    • default_version

      public GLSLangInput default_version(int value)
      Sets the specified value to the default_version field.
    • default_profile

      public GLSLangInput default_profile(int value)
      Sets the specified value to the default_profile field.
    • force_default_version_and_profile

      public GLSLangInput force_default_version_and_profile(boolean value)
      Sets the specified value to the force_default_version_and_profile field.
    • forward_compatible

      public GLSLangInput forward_compatible(boolean value)
      Sets the specified value to the forward_compatible field.
    • messages

      public GLSLangInput messages(int value)
      Sets the specified value to the messages field.
    • resource

      public GLSLangInput resource(@Nullable GLSLangResource value)
      Sets the address of the specified GLSLangResource to the resource field.
    • callbacks

      public GLSLangInput callbacks(GLSLIncludeCallbacks value)
      Copies the specified GLSLIncludeCallbacks to the callbacks field.
    • callbacks

      public GLSLangInput callbacks(Consumer<GLSLIncludeCallbacks> consumer)
      Passes the callbacks field to the specified Consumer.
    • callbacks_ctx

      public GLSLangInput callbacks_ctx(long value)
      Sets the specified value to the callbacks_ctx field.
    • set

      public GLSLangInput set(int language, int stage, int client, int client_version, int target_language, int target_language_version, @Nullable ByteBuffer code, int default_version, int default_profile, boolean force_default_version_and_profile, boolean forward_compatible, int messages, @Nullable GLSLangResource resource, GLSLIncludeCallbacks callbacks, long callbacks_ctx)
      Initializes this struct with the specified values.
    • set

      public GLSLangInput set(GLSLangInput src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static GLSLangInput.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new GLSLangInput.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
    • nlanguage

      public static int nlanguage(long struct)
      Unsafe version of language().
    • nstage

      public static int nstage(long struct)
      Unsafe version of stage().
    • nclient

      public static int nclient(long struct)
      Unsafe version of client().
    • nclient_version

      public static int nclient_version(long struct)
      Unsafe version of client_version().
    • ntarget_language

      public static int ntarget_language(long struct)
      Unsafe version of target_language().
    • ntarget_language_version

      public static int ntarget_language_version(long struct)
      Unsafe version of target_language_version().
    • ncode

      public static @Nullable ByteBuffer ncode(long struct)
      Unsafe version of code().
    • ncodeString

      public static @Nullable String ncodeString(long struct)
      Unsafe version of codeString().
    • ndefault_version

      public static int ndefault_version(long struct)
      Unsafe version of default_version().
    • ndefault_profile

      public static int ndefault_profile(long struct)
      Unsafe version of default_profile().
    • nforce_default_version_and_profile

      public static int nforce_default_version_and_profile(long struct)
    • nforward_compatible

      public static int nforward_compatible(long struct)
      Unsafe version of forward_compatible().
    • nmessages

      public static int nmessages(long struct)
      Unsafe version of messages().
    • nresource

      public static @Nullable GLSLangResource nresource(long struct)
      Unsafe version of resource().
    • ncallbacks

      public static GLSLIncludeCallbacks ncallbacks(long struct)
      Unsafe version of callbacks().
    • ncallbacks_ctx

      public static long ncallbacks_ctx(long struct)
      Unsafe version of callbacks_ctx().
    • nlanguage

      public static void nlanguage(long struct, int value)
      Unsafe version of language.
    • nstage

      public static void nstage(long struct, int value)
      Unsafe version of stage.
    • nclient

      public static void nclient(long struct, int value)
      Unsafe version of client.
    • nclient_version

      public static void nclient_version(long struct, int value)
      Unsafe version of client_version.
    • ntarget_language

      public static void ntarget_language(long struct, int value)
      Unsafe version of target_language.
    • ntarget_language_version

      public static void ntarget_language_version(long struct, int value)
      Unsafe version of target_language_version.
    • ncode

      public static void ncode(long struct, @Nullable ByteBuffer value)
      Unsafe version of code.
    • ndefault_version

      public static void ndefault_version(long struct, int value)
      Unsafe version of default_version.
    • ndefault_profile

      public static void ndefault_profile(long struct, int value)
      Unsafe version of default_profile.
    • nforce_default_version_and_profile

      public static void nforce_default_version_and_profile(long struct, int value)
    • nforward_compatible

      public static void nforward_compatible(long struct, int value)
      Unsafe version of forward_compatible.
    • nmessages

      public static void nmessages(long struct, int value)
      Unsafe version of messages.
    • nresource

      public static void nresource(long struct, @Nullable GLSLangResource value)
      Unsafe version of resource.
    • ncallbacks

      public static void ncallbacks(long struct, GLSLIncludeCallbacks value)
      Unsafe version of callbacks.
    • ncallbacks_ctx

      public static void ncallbacks_ctx(long struct, long value)
      Unsafe version of callbacks_ctx.