Package org.lwjgl.sdl
Class SDL_GPUShaderCreateInfo
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
public class SDL_GPUShaderCreateInfo
extends Struct<SDL_GPUShaderCreateInfo>
implements NativeResource
struct SDL_GPUShaderCreateInfo {
size_t code_size;
Uint8 const * code;
char const * entrypoint;
SDL_GPUShaderFormat format;
SDL_GPUShaderStage stage;
Uint32 num_samplers;
Uint32 num_storage_textures;
Uint32 num_storage_buffers;
Uint32 num_uniform_buffers;
SDL_PropertiesID props;
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_GPUShaderCreateInfo
(ByteBuffer container) Creates aSDL_GPUShaderCreateInfo
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GPUShaderCreateInfo
calloc()
Returns a newSDL_GPUShaderCreateInfo
instance allocated withmemCalloc
.calloc
(int capacity) Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated withmemCalloc
.calloc
(int capacity, MemoryStack stack) Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SDL_GPUShaderCreateInfo
calloc
(MemoryStack stack) Returns a newSDL_GPUShaderCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.code()
code
(ByteBuffer value) Sets the address of the specifiedByteBuffer
to thecode
field.long
static SDL_GPUShaderCreateInfo
create()
Returns a newSDL_GPUShaderCreateInfo
instance allocated withBufferUtils
.create
(int capacity) Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated withBufferUtils
.static SDL_GPUShaderCreateInfo
create
(long address) Returns a newSDL_GPUShaderCreateInfo
instance for the specified memory address.create
(long address, int capacity) Create aSDL_GPUShaderCreateInfo.Buffer
instance at the specified memory.static @Nullable SDL_GPUShaderCreateInfo
createSafe
(long address) static @Nullable SDL_GPUShaderCreateInfo.Buffer
createSafe
(long address, int capacity) entrypoint
(ByteBuffer value) Sets the address of the specified encoded string to theentrypoint
field.int
format()
format
(int value) Sets the specified value to theformat
field.static SDL_GPUShaderCreateInfo
malloc()
Returns a newSDL_GPUShaderCreateInfo
instance allocated withmemAlloc
.malloc
(int capacity) Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated withmemAlloc
.malloc
(int capacity, MemoryStack stack) Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static SDL_GPUShaderCreateInfo
malloc
(MemoryStack stack) Returns a newSDL_GPUShaderCreateInfo
instance allocated on the specifiedMemoryStack
.static ByteBuffer
ncode
(long struct) Unsafe version ofcode
.static void
ncode
(long struct, ByteBuffer value) Unsafe version ofcode
.static long
ncode_size
(long struct) Unsafe version ofcode_size()
.static void
ncode_size
(long struct, long value) Sets the specified value to thecode_size
field of the specifiedstruct
.static ByteBuffer
nentrypoint
(long struct) Unsafe version ofentrypoint()
.static void
nentrypoint
(long struct, ByteBuffer value) Unsafe version ofentrypoint
.static String
nentrypointString
(long struct) Unsafe version ofentrypointString()
.static int
nformat
(long struct) Unsafe version offormat()
.static void
nformat
(long struct, int value) Unsafe version offormat
.static int
nnum_samplers
(long struct) Unsafe version ofnum_samplers()
.static void
nnum_samplers
(long struct, int value) Unsafe version ofnum_samplers
.static int
nnum_storage_buffers
(long struct) Unsafe version ofnum_storage_buffers()
.static void
nnum_storage_buffers
(long struct, int value) Unsafe version ofnum_storage_buffers
.static int
nnum_storage_textures
(long struct) Unsafe version ofnum_storage_textures()
.static void
nnum_storage_textures
(long struct, int value) Unsafe version ofnum_storage_textures
.static int
nnum_uniform_buffers
(long struct) Unsafe version ofnum_uniform_buffers()
.static void
nnum_uniform_buffers
(long struct, int value) Unsafe version ofnum_uniform_buffers
.static int
nprops
(long struct) Unsafe version ofprops()
.static void
nprops
(long struct, int value) Unsafe version ofprops
.static int
nstage
(long struct) Unsafe version ofstage()
.static void
nstage
(long struct, int value) Unsafe version ofstage
.int
num_samplers
(int value) Sets the specified value to thenum_samplers
field.int
num_storage_buffers
(int value) Sets the specified value to thenum_storage_buffers
field.int
num_storage_textures
(int value) Sets the specified value to thenum_storage_textures
field.int
num_uniform_buffers
(int value) Sets the specified value to thenum_uniform_buffers
field.int
props()
props
(int value) Sets the specified value to theprops
field.set
(ByteBuffer code, ByteBuffer entrypoint, int format, int stage, int num_samplers, int num_storage_textures, int num_storage_buffers, int num_uniform_buffers, int props) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
stage()
stage
(int value) Sets the specified value to thestage
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
CODE_SIZE
public static final int CODE_SIZEThe struct member offsets. -
CODE
public static final int CODEThe struct member offsets. -
ENTRYPOINT
public static final int ENTRYPOINTThe struct member offsets. -
FORMAT
public static final int FORMATThe struct member offsets. -
STAGE
public static final int STAGEThe struct member offsets. -
NUM_SAMPLERS
public static final int NUM_SAMPLERSThe struct member offsets. -
NUM_STORAGE_TEXTURES
public static final int NUM_STORAGE_TEXTURESThe struct member offsets. -
NUM_STORAGE_BUFFERS
public static final int NUM_STORAGE_BUFFERSThe struct member offsets. -
NUM_UNIFORM_BUFFERS
public static final int NUM_UNIFORM_BUFFERSThe struct member offsets. -
PROPS
public static final int PROPSThe struct member offsets.
-
-
Constructor Details
-
SDL_GPUShaderCreateInfo
Creates aSDL_GPUShaderCreateInfo
instance at the current position of the specifiedByteBuffer
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
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<SDL_GPUShaderCreateInfo>
-
code_size
public long code_size()- Returns:
- the value of the
code_size
field.
-
code
- Returns:
- a
ByteBuffer
view of the data pointed to by thecode
field.
-
entrypoint
- Returns:
- a
ByteBuffer
view of the null-terminated string pointed to by theentrypoint
field.
-
entrypointString
- Returns:
- the null-terminated string pointed to by the
entrypoint
field.
-
format
public int format()- Returns:
- the value of the
format
field.
-
stage
public int stage()- Returns:
- the value of the
stage
field.
-
num_samplers
public int num_samplers()- Returns:
- the value of the
num_samplers
field.
-
num_storage_textures
public int num_storage_textures()- Returns:
- the value of the
num_storage_textures
field.
-
num_storage_buffers
public int num_storage_buffers()- Returns:
- the value of the
num_storage_buffers
field.
-
num_uniform_buffers
public int num_uniform_buffers()- Returns:
- the value of the
num_uniform_buffers
field.
-
props
public int props()- Returns:
- the value of the
props
field.
-
code
Sets the address of the specifiedByteBuffer
to thecode
field. -
entrypoint
Sets the address of the specified encoded string to theentrypoint
field. -
format
Sets the specified value to theformat
field. -
stage
Sets the specified value to thestage
field. -
num_samplers
Sets the specified value to thenum_samplers
field. -
num_storage_textures
Sets the specified value to thenum_storage_textures
field. -
num_storage_buffers
Sets the specified value to thenum_storage_buffers
field. -
num_uniform_buffers
Sets the specified value to thenum_uniform_buffers
field. -
props
Sets the specified value to theprops
field. -
set
public SDL_GPUShaderCreateInfo set(ByteBuffer code, ByteBuffer entrypoint, int format, int stage, int num_samplers, int num_storage_textures, int num_storage_buffers, int num_uniform_buffers, int props) 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_GPUShaderCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSDL_GPUShaderCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSDL_GPUShaderCreateInfo
instance allocated withBufferUtils
. -
create
Returns a newSDL_GPUShaderCreateInfo
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSDL_GPUShaderCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newSDL_GPUShaderCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSDL_GPUShaderCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSDL_GPUShaderCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
ncode_size
public static long ncode_size(long struct) Unsafe version ofcode_size()
. -
ncode
Unsafe version ofcode
. -
nentrypoint
Unsafe version ofentrypoint()
. -
nentrypointString
Unsafe version ofentrypointString()
. -
nformat
public static int nformat(long struct) Unsafe version offormat()
. -
nstage
public static int nstage(long struct) Unsafe version ofstage()
. -
nnum_samplers
public static int nnum_samplers(long struct) Unsafe version ofnum_samplers()
. -
nnum_storage_textures
public static int nnum_storage_textures(long struct) Unsafe version ofnum_storage_textures()
. -
nnum_storage_buffers
public static int nnum_storage_buffers(long struct) Unsafe version ofnum_storage_buffers()
. -
nnum_uniform_buffers
public static int nnum_uniform_buffers(long struct) Unsafe version ofnum_uniform_buffers()
. -
nprops
public static int nprops(long struct) Unsafe version ofprops()
. -
ncode_size
public static void ncode_size(long struct, long value) Sets the specified value to thecode_size
field of the specifiedstruct
. -
ncode
Unsafe version ofcode
. -
nentrypoint
Unsafe version ofentrypoint
. -
nformat
public static void nformat(long struct, int value) Unsafe version offormat
. -
nstage
public static void nstage(long struct, int value) Unsafe version ofstage
. -
nnum_samplers
public static void nnum_samplers(long struct, int value) Unsafe version ofnum_samplers
. -
nnum_storage_textures
public static void nnum_storage_textures(long struct, int value) Unsafe version ofnum_storage_textures
. -
nnum_storage_buffers
public static void nnum_storage_buffers(long struct, int value) Unsafe version ofnum_storage_buffers
. -
nnum_uniform_buffers
public static void nnum_uniform_buffers(long struct, int value) Unsafe version ofnum_uniform_buffers
. -
nprops
public static void nprops(long struct, int value) Unsafe version ofprops
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-