Class SpvcHlslRootConstants

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<SpvcHlslRootConstants>
org.lwjgl.util.spvc.SpvcHlslRootConstants
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class SpvcHlslRootConstants extends org.lwjgl.system.Struct<SpvcHlslRootConstants> implements org.lwjgl.system.NativeResource
Specifying a root constant (d3d12) or push constant range (vulkan).

start and end denotes the range of the root constant in bytes. Both values need to be multiple of 4.

Layout


 struct spvc_hlsl_root_constants {
     unsigned int start;
     unsigned int end;
     unsigned int binding;
     unsigned int space;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int START
      The struct member offsets.
    • END

      public static final int END
      The struct member offsets.
    • BINDING

      public static final int BINDING
      The struct member offsets.
    • SPACE

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

    • SpvcHlslRootConstants

      public SpvcHlslRootConstants(ByteBuffer container)
      Creates a SpvcHlslRootConstants 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<SpvcHlslRootConstants>
    • start

      public int start()
      Returns:
      the value of the start field.
    • end

      public int end()
      Returns:
      the value of the end field.
    • binding

      public int binding()
      Returns:
      the value of the binding field.
    • space

      public int space()
      Returns:
      the value of the space field.
    • start

      public SpvcHlslRootConstants start(int value)
      Sets the specified value to the start field.
    • end

      public SpvcHlslRootConstants end(int value)
      Sets the specified value to the end field.
    • binding

      public SpvcHlslRootConstants binding(int value)
      Sets the specified value to the binding field.
    • space

      public SpvcHlslRootConstants space(int value)
      Sets the specified value to the space field.
    • set

      public SpvcHlslRootConstants set(int start, int end, int binding, int space)
      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 SpvcHlslRootConstants malloc()
      Returns a new SpvcHlslRootConstants instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static SpvcHlslRootConstants.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new SpvcHlslRootConstants.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
    • nstart

      public static int nstart(long struct)
      Unsafe version of start().
    • nend

      public static int nend(long struct)
      Unsafe version of end().
    • nbinding

      public static int nbinding(long struct)
      Unsafe version of binding().
    • nspace

      public static int nspace(long struct)
      Unsafe version of space().
    • nstart

      public static void nstart(long struct, int value)
      Unsafe version of start.
    • nend

      public static void nend(long struct, int value)
      Unsafe version of end.
    • nbinding

      public static void nbinding(long struct, int value)
      Unsafe version of binding.
    • nspace

      public static void nspace(long struct, int value)
      Unsafe version of space.