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 int
The field for theclearColor
record component.private final int
The field for theheight
record component.private final boolean
The field for theuseDepth
record component.private final boolean
The field for theuseStencil
record component.private final int
The field for thewidth
record 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 aRenderTargetDescriptor
record class. -
Method Summary
Modifier and TypeMethodDescriptionallocate()
boolean
canUsePhysicalResource
(ResourceDescriptor<?> p_394237_) int
Returns the value of theclearColor
record component.final boolean
Indicates whether some other object is "equal to" this one.void
free
(RenderTarget p_363223_) final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.void
prepare
(RenderTarget p_393765_) final String
toString()
Returns a string representation of this record class.boolean
useDepth()
Returns the value of theuseDepth
record component.boolean
Returns the value of theuseStencil
record component.int
width()
Returns the value of thewidth
record component.
-
Field Details
-
width
private final int widthThe field for thewidth
record component. -
height
private final int heightThe field for theheight
record component. -
useDepth
private final boolean useDepthThe field for theuseDepth
record component. -
clearColor
private final int clearColorThe field for theclearColor
record component. -
useStencil
private final boolean useStencilThe field for theuseStencil
record 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 aRenderTargetDescriptor
record class.- Parameters:
width
- the value for thewidth
record componentheight
- the value for theheight
record componentuseDepth
- the value for theuseDepth
record componentclearColor
- the value for theclearColor
record componentuseStencil
- the value for theuseStencil
record component
-
-
Method Details
-
allocate
- Specified by:
allocate
in interfaceResourceDescriptor<RenderTarget>
-
prepare
- Specified by:
prepare
in interfaceResourceDescriptor<RenderTarget>
-
free
- Specified by:
free
in interfaceResourceDescriptor<RenderTarget>
-
canUsePhysicalResource
- Specified by:
canUsePhysicalResource
in 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 thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
useDepth
public boolean useDepth()Returns the value of theuseDepth
record component.- Returns:
- the value of the
useDepth
record component
-
clearColor
public int clearColor()Returns the value of theclearColor
record component.- Returns:
- the value of the
clearColor
record component
-
useStencil
public boolean useStencil()Returns the value of theuseStencil
record component.- Returns:
- the value of the
useStencil
record component
-