Record Class RenderTargetDescriptor
java.lang.Object
java.lang.Record
com.mojang.blaze3d.resource.RenderTargetDescriptor
- All Implemented Interfaces:
ResourceDescriptor<RenderTarget>
public record RenderTargetDescriptor(int width, int height, @Nullable RenderTargetDescriptor.TextureProperties color, @Nullable RenderTargetDescriptor.TextureProperties depth)
extends Record
implements ResourceDescriptor<RenderTarget>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable RenderTargetDescriptor.TexturePropertiesThe field for thecolorrecord component.private final @Nullable RenderTargetDescriptor.TexturePropertiesThe field for thedepthrecord component.private final intThe field for theheightrecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRenderTargetDescriptor(int width, int height, @Nullable RenderTargetDescriptor.TextureProperties color, @Nullable RenderTargetDescriptor.TextureProperties depth) Creates an instance of aRenderTargetDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionallocate()booleancanUsePhysicalResource(ResourceDescriptor<?> other) color()Returns the value of thecolorrecord component.depth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.voidfree(RenderTarget resource) final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.voidprepare(RenderTarget resource) final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
width
private final int widthThe field for thewidthrecord component. -
height
private final int heightThe field for theheightrecord component. -
color
The field for thecolorrecord component. -
depth
The field for thedepthrecord component.
-
-
Constructor Details
-
RenderTargetDescriptor
public RenderTargetDescriptor(int width, int height, @Nullable RenderTargetDescriptor.TextureProperties color, @Nullable RenderTargetDescriptor.TextureProperties depth) Creates an instance of aRenderTargetDescriptorrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentcolor- the value for thecolorrecord componentdepth- the value for thedepthrecord component
-
-
Method Details
-
allocate
- Specified by:
allocatein interfaceResourceDescriptor<RenderTarget>
-
prepare
- Specified by:
preparein interfaceResourceDescriptor<RenderTarget>
-
free
- Specified by:
freein interfaceResourceDescriptor<RenderTarget>
-
canUsePhysicalResource
- Specified by:
canUsePhysicalResourcein interfaceResourceDescriptor<RenderTarget>
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
depth
Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-