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, boolean useStencil, Vector4fc clearColor, GpuFormat format)
extends Record
implements ResourceDescriptor<RenderTarget>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Vector4fcThe field for theclearColorrecord component.private final GpuFormatThe field for theformatrecord 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, boolean useStencil, Vector4fc clearColor, GpuFormat format) Creates an instance of aRenderTargetDescriptorrecord class.RenderTargetDescriptor(int width, int height, boolean useDepth, Vector4fc clearColor, GpuFormat format) -
Method Summary
Modifier and TypeMethodDescriptionallocate()booleancanUsePhysicalResource(ResourceDescriptor<?> other) Returns the value of theclearColorrecord component.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.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.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. -
useStencil
private final boolean useStencilThe field for theuseStencilrecord component. -
clearColor
The field for theclearColorrecord component. -
format
The field for theformatrecord component.
-
-
Constructor Details
-
RenderTargetDescriptor
-
RenderTargetDescriptor
public RenderTargetDescriptor(int width, int height, boolean useDepth, boolean useStencil, Vector4fc clearColor, GpuFormat format) Creates an instance of aRenderTargetDescriptorrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentuseDepth- the value for theuseDepthrecord componentuseStencil- the value for theuseStencilrecord componentclearColor- the value for theclearColorrecord componentformat- the value for theformatrecord 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
-
useDepth
public boolean useDepth()Returns the value of theuseDepthrecord component.- Returns:
- the value of the
useDepthrecord component
-
useStencil
public boolean useStencil()Returns the value of theuseStencilrecord component.- Returns:
- the value of the
useStencilrecord component
-
clearColor
Returns the value of theclearColorrecord component.- Returns:
- the value of the
clearColorrecord component
-
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-