Package org.lwjgl.sdl
Class SDL_GPUVertexAttribute
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
public class SDL_GPUVertexAttribute
extends Struct<SDL_GPUVertexAttribute>
implements NativeResource
struct SDL_GPUVertexAttribute {
Uint32 location;
Uint32 buffer_slot;
SDL_GPUVertexElementFormat format;
Uint32 offset;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSDL_GPUVertexAttribute(ByteBuffer container) Creates aSDL_GPUVertexAttributeinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintbuffer_slot(int value) Sets the specified value to thebuffer_slotfield.static SDL_GPUVertexAttributecalloc()Returns a newSDL_GPUVertexAttributeinstance allocated withmemCalloc.calloc(int capacity) Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated withmemCalloc.calloc(int capacity, MemoryStack stack) Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_GPUVertexAttributecalloc(MemoryStack stack) Returns a newSDL_GPUVertexAttributeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SDL_GPUVertexAttributecreate()Returns a newSDL_GPUVertexAttributeinstance allocated withBufferUtils.create(int capacity) Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated withBufferUtils.static SDL_GPUVertexAttributecreate(long address) Returns a newSDL_GPUVertexAttributeinstance for the specified memory address.create(long address, int capacity) Create aSDL_GPUVertexAttribute.Bufferinstance at the specified memory.static @Nullable SDL_GPUVertexAttributecreateSafe(long address) static @Nullable SDL_GPUVertexAttribute.BuffercreateSafe(long address, int capacity) intformat()format(int value) Sets the specified value to theformatfield.intlocation()location(int value) Sets the specified value to thelocationfield.static SDL_GPUVertexAttributemalloc()Returns a newSDL_GPUVertexAttributeinstance allocated withmemAlloc.malloc(int capacity) Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated withmemAlloc.malloc(int capacity, MemoryStack stack) Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated on the specifiedMemoryStack.static SDL_GPUVertexAttributemalloc(MemoryStack stack) Returns a newSDL_GPUVertexAttributeinstance allocated on the specifiedMemoryStack.static intnbuffer_slot(long struct) Unsafe version ofbuffer_slot().static voidnbuffer_slot(long struct, int value) Unsafe version ofbuffer_slot.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 intnoffset(long struct) Unsafe version ofoffset().static voidnoffset(long struct, int value) Unsafe version ofoffset.intoffset()offset(int value) Sets the specified value to theoffsetfield.set(int location, int buffer_slot, int format, int offset) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
LOCATION
public static final int LOCATIONThe struct member offsets. -
BUFFER_SLOT
public static final int BUFFER_SLOTThe struct member offsets. -
FORMAT
public static final int FORMATThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets.
-
-
Constructor Details
-
SDL_GPUVertexAttribute
Creates aSDL_GPUVertexAttributeinstance 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<SDL_GPUVertexAttribute>
-
location
public int location()- Returns:
- the value of the
locationfield.
-
buffer_slot
public int buffer_slot()- Returns:
- the value of the
buffer_slotfield.
-
format
public int format()- Returns:
- the value of the
formatfield.
-
offset
public int offset()- Returns:
- the value of the
offsetfield.
-
location
Sets the specified value to thelocationfield. -
buffer_slot
Sets the specified value to thebuffer_slotfield. -
format
Sets the specified value to theformatfield. -
offset
Sets the specified value to theoffsetfield. -
set
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
Returns a newSDL_GPUVertexAttributeinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSDL_GPUVertexAttributeinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSDL_GPUVertexAttributeinstance allocated withBufferUtils. -
create
Returns a newSDL_GPUVertexAttributeinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSDL_GPUVertexAttribute.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_GPUVertexAttributeinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSDL_GPUVertexAttributeinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSDL_GPUVertexAttribute.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nlocation
public static int nlocation(long struct) Unsafe version oflocation(). -
nbuffer_slot
public static int nbuffer_slot(long struct) Unsafe version ofbuffer_slot(). -
nformat
public static int nformat(long struct) Unsafe version offormat(). -
noffset
public static int noffset(long struct) Unsafe version ofoffset(). -
nlocation
public static void nlocation(long struct, int value) Unsafe version oflocation. -
nbuffer_slot
public static void nbuffer_slot(long struct, int value) Unsafe version ofbuffer_slot. -
nformat
public static void nformat(long struct, int value) Unsafe version offormat. -
noffset
public static void noffset(long struct, int value) Unsafe version ofoffset.
-