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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final StructLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final StructLayoutstatic final ValueLayout.OfLongstatic final AddressLayoutstatic 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
ConstructorsConstructorDescriptionWGPUTextureDescriptor(@NotNull MemorySegment segment) Creates an instance of aWGPUTextureDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WGPUTextureDescriptorstatic WGPUTextureDescriptor.Ptrstatic WGPUTextureDescriptorclone(Arena arena, WGPUTextureDescriptor src) intdimension(int 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.@NotNull WGPUStringViewlabel()label(@NotNull WGPUStringView value) label(Consumer<@NotNull WGPUStringView> consumer) intmipLevelCount(int value) @Nullable WGPUChainedStructnextInChain(int assumedCount) nextInChain(@Nullable IWGPUChainedStruct value) @NotNull MemorySegmentvoidnextInChainRaw(@NotNull MemorySegment value) intsampleCount(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.@NotNull WGPUExtent3dsize()size(@NotNull WGPUExtent3d value) size(Consumer<@NotNull WGPUExtent3d> consumer) final StringtoString()Returns a string representation of this record class.longusage()usage(long value) longviewFormatCount(long value) @Nullable IntPtrNote: the returnedIntPtrdoes not have correctIntPtr.size()property.viewFormats(@Nullable IntPtr value) @NotNull MemorySegmentvoidviewFormatsRaw(@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 aWGPUTextureDescriptorrecord class.- Parameters:
segment- the value for thesegmentrecord 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 returnedIntPtrdoes 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 thesegmentrecord component.
-