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

    Fields
    Modifier and Type
    Field
    Description
    private final int
    The field for the clearColor record component.
    private final int
    The field for the height record component.
    private final boolean
    The field for the useDepth record component.
    private final boolean
    The field for the useStencil record component.
    private final int
    The field for the width record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RenderTargetDescriptor(int width, int height, boolean useDepth, int clearColor)
     
    RenderTargetDescriptor(int width, int height, boolean useDepth, int clearColor, boolean useStencil)
    Creates an instance of a RenderTargetDescriptor record class.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    int
    Returns the value of the clearColor record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    void
    free(RenderTarget p_363223_)
     
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    void
    prepare(RenderTarget p_393765_)
     
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the useDepth record component.
    boolean
    Returns the value of the useStencil record component.
    int
    Returns the value of the width record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • width

      private final int width
      The field for the width record component.
    • height

      private final int height
      The field for the height record component.
    • useDepth

      private final boolean useDepth
      The field for the useDepth record component.
    • clearColor

      private final int clearColor
      The field for the clearColor record component.
    • useStencil

      private final boolean useStencil
      The field for the useStencil 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 a RenderTargetDescriptor record class.
      Parameters:
      width - the value for the width record component
      height - the value for the height record component
      useDepth - the value for the useDepth record component
      clearColor - the value for the clearColor record component
      useStencil - the value for the useStencil record component
  • Method Details

    • allocate

      public RenderTarget allocate()
      Specified by:
      allocate in interface ResourceDescriptor<RenderTarget>
    • prepare

      public void prepare(RenderTarget p_393765_)
      Specified by:
      prepare in interface ResourceDescriptor<RenderTarget>
    • free

      public void free(RenderTarget p_363223_)
      Specified by:
      free in interface ResourceDescriptor<RenderTarget>
    • canUsePhysicalResource

      public boolean canUsePhysicalResource(ResourceDescriptor<?> p_394237_)
      Specified by:
      canUsePhysicalResource in interface ResourceDescriptor<RenderTarget>
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • useDepth

      public boolean useDepth()
      Returns the value of the useDepth record component.
      Returns:
      the value of the useDepth record component
    • clearColor

      public int clearColor()
      Returns the value of the clearColor record component.
      Returns:
      the value of the clearColor record component
    • useStencil

      public boolean useStencil()
      Returns the value of the useStencil record component.
      Returns:
      the value of the useStencil record component