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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final AddressLayoutstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_GPUShaderCreateInfo(@NotNull MemorySegment segment) Creates an instance of aSDL_GPUShaderCreateInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GPUShaderCreateInfostatic SDL_GPUShaderCreateInfo.Ptrstatic SDL_GPUShaderCreateInfoclone(Arena arena, SDL_GPUShaderCreateInfo src) @Nullable BytePtrcode()Note: the returnedBytePtrdoes not have correctBytePtr.size()property.longcode_size(long value) codeRaw()voidcodeRaw(MemorySegment value) @Nullable BytePtrNote: the returnedBytePtrdoes not have correctBytePtr.size()property.entrypoint(@Nullable BytePtr value) voidentrypointRaw(MemorySegment value) final booleanIndicates whether some other object is "equal to" this one.intformat()format(int value) final inthashCode()Returns a hash code value for this object.intnum_samplers(int value) intnum_storage_buffers(int value) intnum_storage_textures(int value) intnum_uniform_buffers(int value) intprops()props(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.intstage()stage(int value) final StringtoString()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_GPUShaderCreateInforecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
code_size
-
code_size
-
code
Note: the returnedBytePtrdoes 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 returnedBytePtrdoes 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 thesegmentrecord component.
-