Record Class WGPUTextureDescriptor
java.lang.Object
java.lang.Record
club.doki7.webgpu.datatype.WGPUTextureDescriptor
- All Implemented Interfaces:
IPointer
,IWGPUTextureDescriptor
@ValueBasedCandidate
@UnsafeConstructor
public record WGPUTextureDescriptor(@NotNull MemorySegment segment)
extends Record
implements IWGPUTextureDescriptor
Represents a pointer to a WGPUTextureDescriptor
structure in native memory.
Structure
typedef struct WGPUTextureDescriptor {
WGPUChainedStruct
const* nextInChain
; // optional
WGPUStringView
label
;
WGPUTextureUsage
usage
;
WGPUTextureDimension
dimension
;
WGPUExtent3d
size
;
WGPUTextureFormat
format
;
uint32_t mipLevelCount
;
uint32_t sampleCount
;
size_t viewFormatCount
;
WGPUTextureFormat
const* viewFormats
;
} WGPUTextureDescriptor;
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 ValueLayout.OfInt
static final ValueLayout.OfInt
static final StructLayout
static final ValueLayout.OfInt
static final AddressLayout
static final ValueLayout.OfInt
static final StructLayout
static final ValueLayout.OfLong
static final AddressLayout
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
ConstructorsConstructorDescriptionWGPUTextureDescriptor
(@NotNull MemorySegment segment) Creates an instance of aWGPUTextureDescriptor
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WGPUTextureDescriptor
static WGPUTextureDescriptor.Ptr
static WGPUTextureDescriptor
clone
(Arena arena, WGPUTextureDescriptor src) int
dimension
(int 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.@NotNull WGPUStringView
label()
label
(@NotNull WGPUStringView value) label
(Consumer<@NotNull WGPUStringView> consumer) int
mipLevelCount
(int value) @Nullable WGPUChainedStruct
nextInChain
(int assumedCount) nextInChain
(@Nullable IWGPUChainedStruct value) @NotNull MemorySegment
void
nextInChainRaw
(@NotNull MemorySegment value) int
sampleCount
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.@NotNull WGPUExtent3d
size()
size
(@NotNull WGPUExtent3d value) size
(Consumer<@NotNull WGPUExtent3d> consumer) final String
toString()
Returns a string representation of this record class.long
usage()
usage
(long value) long
viewFormatCount
(long value) @Nullable IntPtr
Note: the returnedIntPtr
does not have correctIntPtr.size()
property.viewFormats
(@Nullable IntPtr value) @NotNull MemorySegment
void
viewFormatsRaw
(@NotNull MemorySegment value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$nextInChain
-
PATH$label
-
PATH$usage
-
PATH$dimension
-
PATH$size
-
PATH$format
-
PATH$mipLevelCount
-
PATH$sampleCount
-
PATH$viewFormatCount
-
PATH$viewFormats
-
LAYOUT$nextInChain
-
LAYOUT$label
-
LAYOUT$usage
-
LAYOUT$dimension
-
LAYOUT$size
-
LAYOUT$format
-
LAYOUT$mipLevelCount
-
LAYOUT$sampleCount
-
LAYOUT$viewFormats
-
SIZE$nextInChain
public static final long SIZE$nextInChain -
SIZE$label
public static final long SIZE$label -
SIZE$usage
public static final long SIZE$usage -
SIZE$dimension
public static final long SIZE$dimension -
SIZE$size
public static final long SIZE$size -
SIZE$format
public static final long SIZE$format -
SIZE$mipLevelCount
public static final long SIZE$mipLevelCount -
SIZE$sampleCount
public static final long SIZE$sampleCount -
SIZE$viewFormatCount
public static final long SIZE$viewFormatCount -
SIZE$viewFormats
public static final long SIZE$viewFormats -
OFFSET$nextInChain
public static final long OFFSET$nextInChain -
OFFSET$label
public static final long OFFSET$label -
OFFSET$usage
public static final long OFFSET$usage -
OFFSET$dimension
public static final long OFFSET$dimension -
OFFSET$size
public static final long OFFSET$size -
OFFSET$format
public static final long OFFSET$format -
OFFSET$mipLevelCount
public static final long OFFSET$mipLevelCount -
OFFSET$sampleCount
public static final long OFFSET$sampleCount -
OFFSET$viewFormatCount
public static final long OFFSET$viewFormatCount -
OFFSET$viewFormats
public static final long OFFSET$viewFormats
-
-
Constructor Details
-
WGPUTextureDescriptor
Creates an instance of aWGPUTextureDescriptor
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
nextInChain
-
nextInChain
-
nextInChain
-
nextInChainRaw
-
nextInChainRaw
public void nextInChainRaw(@Pointer(target=WGPUChainedStruct.class) @NotNull @NotNull MemorySegment value) -
label
-
label
-
label
-
usage
-
usage
-
dimension
-
dimension
-
size
-
size
-
size
-
format
-
format
-
mipLevelCount
-
mipLevelCount
-
sampleCount
-
sampleCount
-
viewFormatCount
-
viewFormatCount
-
viewFormats
Note: the returnedIntPtr
does not have correctIntPtr.size()
property. It's up to user to track the size of the buffer, and useIntPtr.reinterpret(long)
to set the size before actually reading fro or writing to the buffer. -
viewFormats
public WGPUTextureDescriptor viewFormats(@Nullable @EnumType(WGPUTextureFormat.class) @Nullable IntPtr value) -
viewFormatsRaw
-
viewFormatsRaw
public void viewFormatsRaw(@Pointer(target=WGPUTextureFormat.class) @NotNull @NotNull MemorySegment value) -
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.
-