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 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.
    • useStencil

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

      private final Vector4fc clearColor
      The field for the clearColor record component.
    • format

      private final GpuFormat format
      The field for the format record component.
  • Constructor Details

    • RenderTargetDescriptor

      public RenderTargetDescriptor(int width, int height, boolean useDepth, Vector4fc clearColor, GpuFormat format)
    • RenderTargetDescriptor

      public RenderTargetDescriptor(int width, int height, boolean useDepth, boolean useStencil, Vector4fc clearColor, GpuFormat format)
      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
      useStencil - the value for the useStencil record component
      clearColor - the value for the clearColor record component
      format - the value for the format record component
  • Method Details

    • allocate

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

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

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

      public boolean canUsePhysicalResource(ResourceDescriptor<?> other)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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
    • useStencil

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

      public Vector4fc clearColor()
      Returns the value of the clearColor record component.
      Returns:
      the value of the clearColor record component
    • format

      public GpuFormat format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component