Record Class SDL_GPUColorTargetInfo
- All Implemented Interfaces:
IPointer,ISDL_GPUColorTargetInfo
A structure specifying the parameters of a color target used by a render pass.
The load_op field determines what is done with the texture at the beginning of the render pass.
- LOAD: Loads the data currently in the texture. Not recommended for multisample textures as it requires significant memory bandwidth.
- CLEAR: Clears the texture to a single color.
- DONT_CARE: The driver will do whatever it wants with the texture memory. This is a good option if you know that every single pixel will be touched in the render pass.
The store_op field determines what is done with the color results of the render pass.
- STORE: Stores the results of the render pass in the texture. Not recommended for multisample textures as it requires significant memory bandwidth.
- DONT_CARE: The driver will do whatever it wants with the texture memory. This is often a good option for depth/stencil textures.
- RESOLVE: Resolves a multisample texture into resolve_texture, which must have a sample count of 1. Then the driver may discard the multisample texture memory. This is the most performant method of resolving a multisample target.
- RESOLVE_AND_STORE: Resolves a multisample texture into the resolve_texture, which must have a sample count of 1. Then the driver stores the multisample texture's contents. Not recommended as it requires significant memory bandwidth.
Since: This struct is available since SDL 3.2.0.
See also:
SDL_BeginGPURenderPass
Structure
typedef struct SDL_GPUColorTargetInfo {
SDL_GPUTexture* texture;
Uint32 mip_level;
Uint32 layer_or_depth_plane;
SDL_FColor clear_color;
SDL_GPULoadOp load_op;
SDL_GPUStoreOp store_op;
SDL_GPUTexture* resolve_texture;
Uint32 resolve_mip_level;
Uint32 resolve_layer;
bool cycle;
bool cycle_resolve_texture;
Uint8 padding1;
Uint8 padding2;
} SDL_GPUColorTargetInfo;
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 StructLayoutstatic final ValueLayout.OfBooleanstatic final ValueLayout.OfBooleanstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfBytestatic final ValueLayout.OfBytestatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final ValueLayout.OfIntstatic final AddressLayoutstatic final longstatic final longstatic final longstatic 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 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 longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_GPUColorTargetInfo(@NotNull MemorySegment segment) Creates an instance of aSDL_GPUColorTargetInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GPUColorTargetInfostatic SDL_GPUColorTargetInfo.Ptr@NotNull SDL_FColorclear_color(@NotNull SDL_FColor value) clear_color(Consumer<@NotNull SDL_FColor> consumer) static SDL_GPUColorTargetInfoclone(Arena arena, SDL_GPUColorTargetInfo src) booleancycle()cycle(boolean value) booleancycle_resolve_texture(boolean value) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlayer_or_depth_plane(int value) intload_op()load_op(int value) intmip_level(int value) bytepadding1()padding1(byte value) bytepadding2()padding2(byte value) intresolve_layer(int value) intresolve_mip_level(int value) @Nullable SDL_GPUTextureresolve_texture(@Nullable SDL_GPUTexture value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.intstore_op()store_op(int value) @Nullable SDL_GPUTexturetexture()texture(@Nullable SDL_GPUTexture value) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$texture
-
PATH$mip_level
-
PATH$layer_or_depth_plane
-
PATH$clear_color
-
PATH$load_op
-
PATH$store_op
-
PATH$resolve_texture
-
PATH$resolve_mip_level
-
PATH$resolve_layer
-
PATH$cycle
-
PATH$cycle_resolve_texture
-
PATH$padding1
-
PATH$padding2
-
LAYOUT$texture
-
LAYOUT$mip_level
-
LAYOUT$layer_or_depth_plane
-
LAYOUT$clear_color
-
LAYOUT$load_op
-
LAYOUT$store_op
-
LAYOUT$resolve_texture
-
LAYOUT$resolve_mip_level
-
LAYOUT$resolve_layer
-
LAYOUT$cycle
-
LAYOUT$cycle_resolve_texture
-
LAYOUT$padding1
-
LAYOUT$padding2
-
SIZE$texture
public static final long SIZE$texture -
SIZE$mip_level
public static final long SIZE$mip_level -
SIZE$layer_or_depth_plane
public static final long SIZE$layer_or_depth_plane -
SIZE$clear_color
public static final long SIZE$clear_color -
SIZE$load_op
public static final long SIZE$load_op -
SIZE$store_op
public static final long SIZE$store_op -
SIZE$resolve_texture
public static final long SIZE$resolve_texture -
SIZE$resolve_mip_level
public static final long SIZE$resolve_mip_level -
SIZE$resolve_layer
public static final long SIZE$resolve_layer -
SIZE$cycle
public static final long SIZE$cycle -
SIZE$cycle_resolve_texture
public static final long SIZE$cycle_resolve_texture -
SIZE$padding1
public static final long SIZE$padding1 -
SIZE$padding2
public static final long SIZE$padding2 -
OFFSET$texture
public static final long OFFSET$texture -
OFFSET$mip_level
public static final long OFFSET$mip_level -
OFFSET$layer_or_depth_plane
public static final long OFFSET$layer_or_depth_plane -
OFFSET$clear_color
public static final long OFFSET$clear_color -
OFFSET$load_op
public static final long OFFSET$load_op -
OFFSET$store_op
public static final long OFFSET$store_op -
OFFSET$resolve_texture
public static final long OFFSET$resolve_texture -
OFFSET$resolve_mip_level
public static final long OFFSET$resolve_mip_level -
OFFSET$resolve_layer
public static final long OFFSET$resolve_layer -
OFFSET$cycle
public static final long OFFSET$cycle -
OFFSET$cycle_resolve_texture
public static final long OFFSET$cycle_resolve_texture -
OFFSET$padding1
public static final long OFFSET$padding1 -
OFFSET$padding2
public static final long OFFSET$padding2
-
-
Constructor Details
-
SDL_GPUColorTargetInfo
Creates an instance of aSDL_GPUColorTargetInforecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
texture
-
texture
-
mip_level
-
mip_level
-
layer_or_depth_plane
-
layer_or_depth_plane
-
clear_color
-
clear_color
-
clear_color
-
load_op
-
load_op
-
store_op
-
store_op
-
resolve_texture
-
resolve_texture
-
resolve_mip_level
-
resolve_mip_level
-
resolve_layer
-
resolve_layer
-
cycle
-
cycle
-
cycle_resolve_texture
-
cycle_resolve_texture
-
padding1
-
padding1
-
padding2
-
padding2
-
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.
-