Record Class SDL_GPUShaderCreateInfo
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_GPUShaderCreateInfo
- All Implemented Interfaces:
IPointer
,ISDL_GPUShaderCreateInfo
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_GPUShaderCreateInfo(@NotNull MemorySegment segment)
extends Record
implements ISDL_GPUShaderCreateInfo
A structure specifying code and metadata for creating a shader object.
Since: This struct is available since SDL 3.2.0.
See also:
SDL_CreateGPUShader
Structure
typedef 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
;
} SDL_GPUShaderCreateInfo;
Contracts
The property segment()
should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)
), and properly aligned to
LAYOUT.byteAlignment()
bytes. To represent null pointer, you may use a Java
null
instead. See the documentation of IPointer.segment()
for more details.
The constructor of this class is marked as UnsafeConstructor
, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final AddressLayout
static final AddressLayout
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_GPUShaderCreateInfo
(@NotNull MemorySegment segment) Creates an instance of aSDL_GPUShaderCreateInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GPUShaderCreateInfo
static SDL_GPUShaderCreateInfo.Ptr
static SDL_GPUShaderCreateInfo
clone
(Arena arena, SDL_GPUShaderCreateInfo src) @Nullable BytePtr
code()
Note: the returnedBytePtr
does not have correctBytePtr.size()
property.long
code_size
(long value) codeRaw()
void
codeRaw
(MemorySegment value) @Nullable BytePtr
Note: the returnedBytePtr
does not have correctBytePtr.size()
property.entrypoint
(@Nullable BytePtr value) void
entrypointRaw
(MemorySegment value) final boolean
Indicates whether some other object is "equal to" this one.int
format()
format
(int value) final int
hashCode()
Returns a hash code value for this object.int
num_samplers
(int value) int
num_storage_buffers
(int value) int
num_storage_textures
(int value) int
num_uniform_buffers
(int value) int
props()
props
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.int
stage()
stage
(int value) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$code_size
-
PATH$code
-
PATH$entrypoint
-
PATH$format
-
PATH$stage
-
PATH$num_samplers
-
PATH$num_storage_textures
-
PATH$num_storage_buffers
-
PATH$num_uniform_buffers
-
PATH$props
-
LAYOUT$code
-
LAYOUT$entrypoint
-
LAYOUT$format
-
LAYOUT$stage
-
LAYOUT$num_samplers
-
LAYOUT$num_storage_textures
-
LAYOUT$num_storage_buffers
-
LAYOUT$num_uniform_buffers
-
LAYOUT$props
-
SIZE$code_size
public static final long SIZE$code_size -
SIZE$code
public static final long SIZE$code -
SIZE$entrypoint
public static final long SIZE$entrypoint -
SIZE$format
public static final long SIZE$format -
SIZE$stage
public static final long SIZE$stage -
SIZE$num_samplers
public static final long SIZE$num_samplers -
SIZE$num_storage_textures
public static final long SIZE$num_storage_textures -
SIZE$num_storage_buffers
public static final long SIZE$num_storage_buffers -
SIZE$num_uniform_buffers
public static final long SIZE$num_uniform_buffers -
SIZE$props
public static final long SIZE$props -
OFFSET$code_size
public static final long OFFSET$code_size -
OFFSET$code
public static final long OFFSET$code -
OFFSET$entrypoint
public static final long OFFSET$entrypoint -
OFFSET$format
public static final long OFFSET$format -
OFFSET$stage
public static final long OFFSET$stage -
OFFSET$num_samplers
public static final long OFFSET$num_samplers -
OFFSET$num_storage_textures
public static final long OFFSET$num_storage_textures -
OFFSET$num_storage_buffers
public static final long OFFSET$num_storage_buffers -
OFFSET$num_uniform_buffers
public static final long OFFSET$num_uniform_buffers -
OFFSET$props
public static final long OFFSET$props
-
-
Constructor Details
-
SDL_GPUShaderCreateInfo
Creates an instance of aSDL_GPUShaderCreateInfo
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
code_size
-
code_size
-
code
Note: the returnedBytePtr
does not have correctBytePtr.size()
property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)
to set the size before actually reading from or writing to the buffer. -
code
public SDL_GPUShaderCreateInfo code(@Nullable @Pointer(comment="Uint8") @Unsigned @Nullable BytePtr value) -
codeRaw
-
codeRaw
-
entrypoint
Note: the returnedBytePtr
does not have correctBytePtr.size()
property. It's up to user to track the size of the buffer, and useBytePtr.reinterpret(long)
to set the size before actually reading from or writing to the buffer. -
entrypoint
-
entrypointRaw
-
entrypointRaw
-
format
-
format
-
stage
-
stage
-
num_samplers
-
num_samplers
-
num_storage_textures
-
num_storage_textures
-
num_storage_buffers
-
num_storage_buffers
-
num_uniform_buffers
-
num_uniform_buffers
-
props
-
props
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-