Package org.lwjgl.util.spvc
Class SpvcMslShaderInput
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.spvc.SpvcMslShaderInput
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class SpvcMslShaderInput extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDefines MSL characteristics of an input variable at a particular location.After compilation, it is possible to query whether or not this location was used. If
vecsizeis nonzero, it must be greater than or equal to thevecsizedeclared in the shader, or behavior is undefined.Layout
struct spvc_msl_shader_input { unsigned location; spvc_msl_vertex_format format; SpvBuiltIn builtin; unsigned vecsize; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpvcMslShaderInput.BufferAn array ofSpvcMslShaderInputstructs.
-
Constructor Summary
Constructors Constructor Description SpvcMslShaderInput(java.nio.ByteBuffer container)Creates aSpvcMslShaderInputinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intbuiltin()SpvcMslShaderInputbuiltin(int value)Sets the specified value to thebuiltinfield.static SpvcMslShaderInputcalloc()Returns a newSpvcMslShaderInputinstance allocated withmemCalloc.static SpvcMslShaderInput.Buffercalloc(int capacity)Returns a newSpvcMslShaderInput.Bufferinstance allocated withmemCalloc.static SpvcMslShaderInput.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSpvcMslShaderInput.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcMslShaderInputcalloc(org.lwjgl.system.MemoryStack stack)Returns a newSpvcMslShaderInputinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SpvcMslShaderInputcreate()Returns a newSpvcMslShaderInputinstance allocated withBufferUtils.static SpvcMslShaderInput.Buffercreate(int capacity)Returns a newSpvcMslShaderInput.Bufferinstance allocated withBufferUtils.static SpvcMslShaderInputcreate(long address)Returns a newSpvcMslShaderInputinstance for the specified memory address.static SpvcMslShaderInput.Buffercreate(long address, int capacity)Create aSpvcMslShaderInput.Bufferinstance at the specified memory.static SpvcMslShaderInputcreateSafe(long address)static SpvcMslShaderInput.BuffercreateSafe(long address, int capacity)intformat()SpvcMslShaderInputformat(int value)Sets the specified value to theformatfield.intlocation()SpvcMslShaderInputlocation(int value)Sets the specified value to thelocationfield.static SpvcMslShaderInputmalloc()Returns a newSpvcMslShaderInputinstance allocated withmemAlloc.static SpvcMslShaderInput.Buffermalloc(int capacity)Returns a newSpvcMslShaderInput.Bufferinstance allocated withmemAlloc.static SpvcMslShaderInput.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSpvcMslShaderInput.Bufferinstance allocated on the specifiedMemoryStack.static SpvcMslShaderInputmalloc(org.lwjgl.system.MemoryStack stack)Returns a newSpvcMslShaderInputinstance allocated on the specifiedMemoryStack.static intnbuiltin(long struct)Unsafe version ofbuiltin().static voidnbuiltin(long struct, int value)Unsafe version ofbuiltin.static intnformat(long struct)Unsafe version offormat().static voidnformat(long struct, int value)Unsafe version offormat.static intnlocation(long struct)Unsafe version oflocation().static voidnlocation(long struct, int value)Unsafe version oflocation.static intnvecsize(long struct)Unsafe version ofvecsize().static voidnvecsize(long struct, int value)Unsafe version ofvecsize.SpvcMslShaderInputset(int location, int format, int builtin, int vecsize)Initializes this struct with the specified values.SpvcMslShaderInputset(SpvcMslShaderInput src)Copies the specified struct data to this struct.intsizeof()intvecsize()SpvcMslShaderInputvecsize(int value)Sets the specified value to thevecsizefield.
-
-
-
Constructor Detail
-
SpvcMslShaderInput
public SpvcMslShaderInput(java.nio.ByteBuffer container)
Creates aSpvcMslShaderInputinstance at the current position of the specifiedByteBuffercontainer. 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
location
public int location()
- Returns:
- the value of the
locationfield.
-
format
public int format()
- Returns:
- the value of the
formatfield.
-
builtin
public int builtin()
- Returns:
- the value of the
builtinfield.
-
vecsize
public int vecsize()
- Returns:
- the value of the
vecsizefield.
-
location
public SpvcMslShaderInput location(int value)
Sets the specified value to thelocationfield.
-
format
public SpvcMslShaderInput format(int value)
Sets the specified value to theformatfield.
-
builtin
public SpvcMslShaderInput builtin(int value)
Sets the specified value to thebuiltinfield.
-
vecsize
public SpvcMslShaderInput vecsize(int value)
Sets the specified value to thevecsizefield.
-
set
public SpvcMslShaderInput set(int location, int format, int builtin, int vecsize)
Initializes this struct with the specified values.
-
set
public SpvcMslShaderInput set(SpvcMslShaderInput src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static SpvcMslShaderInput malloc()
Returns a newSpvcMslShaderInputinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static SpvcMslShaderInput calloc()
Returns a newSpvcMslShaderInputinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static SpvcMslShaderInput create()
Returns a newSpvcMslShaderInputinstance allocated withBufferUtils.
-
create
public static SpvcMslShaderInput create(long address)
Returns a newSpvcMslShaderInputinstance for the specified memory address.
-
createSafe
@Nullable public static SpvcMslShaderInput createSafe(long address)
-
malloc
public static SpvcMslShaderInput.Buffer malloc(int capacity)
Returns a newSpvcMslShaderInput.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static SpvcMslShaderInput.Buffer calloc(int capacity)
Returns a newSpvcMslShaderInput.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static SpvcMslShaderInput.Buffer create(int capacity)
Returns a newSpvcMslShaderInput.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static SpvcMslShaderInput.Buffer create(long address, int capacity)
Create aSpvcMslShaderInput.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static SpvcMslShaderInput.Buffer createSafe(long address, int capacity)
-
malloc
public static SpvcMslShaderInput malloc(org.lwjgl.system.MemoryStack stack)
Returns a newSpvcMslShaderInputinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static SpvcMslShaderInput calloc(org.lwjgl.system.MemoryStack stack)
Returns a newSpvcMslShaderInputinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static SpvcMslShaderInput.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSpvcMslShaderInput.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static SpvcMslShaderInput.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSpvcMslShaderInput.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nlocation
public static int nlocation(long struct)
Unsafe version oflocation().
-
nformat
public static int nformat(long struct)
Unsafe version offormat().
-
nbuiltin
public static int nbuiltin(long struct)
Unsafe version ofbuiltin().
-
nvecsize
public static int nvecsize(long struct)
Unsafe version ofvecsize().
-
nlocation
public static void nlocation(long struct, int value)Unsafe version oflocation.
-
nformat
public static void nformat(long struct, int value)Unsafe version offormat.
-
nbuiltin
public static void nbuiltin(long struct, int value)Unsafe version ofbuiltin.
-
nvecsize
public static void nvecsize(long struct, int value)Unsafe version ofvecsize.
-
-