Package com.mojang.blaze3d.resource
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, boolean useDepth, int clearColor, boolean useStencil)
extends Record
implements ResourceDescriptor<RenderTarget>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theclearColorrecord component.private final intThe field for theheightrecord component.private final booleanThe field for theuseDepthrecord component.private final booleanThe field for theuseStencilrecord component.private final intThe field for thewidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRenderTargetDescriptor(int width, int height, boolean useDepth, int clearColor) RenderTargetDescriptor(int width, int height, boolean useDepth, int clearColor, boolean useStencil) Creates an instance of aRenderTargetDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionallocate()booleancanUsePhysicalResource(ResourceDescriptor<?> p_394237_) intReturns the value of theclearColorrecord component.final booleanIndicates whether some other object is "equal to" this one.voidfree(RenderTarget p_363223_) final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.voidprepare(RenderTarget p_393765_) final StringtoString()Returns a string representation of this record class.booleanuseDepth()Returns the value of theuseDepthrecord component.booleanReturns the value of theuseStencilrecord component.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. -
useDepth
private final boolean useDepthThe field for theuseDepthrecord component. -
clearColor
private final int clearColorThe field for theclearColorrecord component. -
useStencil
private final boolean useStencilThe field for theuseStencilrecord component.
-
-
Constructor Details
-
RenderTargetDescriptor
public RenderTargetDescriptor(int width, int height, boolean useDepth, int clearColor) -
RenderTargetDescriptor
public RenderTargetDescriptor(int width, int height, boolean useDepth, int clearColor, boolean useStencil) Creates an instance of aRenderTargetDescriptorrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentuseDepth- the value for theuseDepthrecord componentclearColor- the value for theclearColorrecord componentuseStencil- the value for theuseStencilrecord 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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 with '=='. -
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
-
useDepth
public boolean useDepth()Returns the value of theuseDepthrecord component.- Returns:
- the value of the
useDepthrecord component
-
clearColor
public int clearColor()Returns the value of theclearColorrecord component.- Returns:
- the value of the
clearColorrecord component
-
useStencil
public boolean useStencil()Returns the value of theuseStencilrecord component.- Returns:
- the value of the
useStencilrecord component
-