Record Class RenderPipeline.Snippet

java.lang.Object
java.lang.Record
com.mojang.renderpearl.api.pipeline.RenderPipeline.Snippet
Enclosing class:
RenderPipeline

public static record RenderPipeline.Snippet(Map<ShaderType, Identifier> shaders, Optional<ShaderDefines> shaderDefines, Optional<List<BindGroupLayout>> bindGroupLayouts, @Nullable ColorTargetState[] colorTargetStates, int activeColorTargetStateCount, Optional<DepthStencilState> depthStencilState, Optional<PolygonMode> polygonMode, Optional<Boolean> cull, @Nullable VertexFormat[] vertexFormatPerBuffer, Optional<PrimitiveTopology> vertexFormatMode, int pushConstantSize) extends Record
  • Field Details

    • shaders

      private final Map<ShaderType, Identifier> shaders
      The field for the shaders record component.
    • shaderDefines

      private final Optional<ShaderDefines> shaderDefines
      The field for the shaderDefines record component.
    • bindGroupLayouts

      private final Optional<List<BindGroupLayout>> bindGroupLayouts
      The field for the bindGroupLayouts record component.
    • colorTargetStates

      private final @Nullable ColorTargetState[] colorTargetStates
      The field for the colorTargetStates record component.
    • activeColorTargetStateCount

      private final int activeColorTargetStateCount
      The field for the activeColorTargetStateCount record component.
    • depthStencilState

      private final Optional<DepthStencilState> depthStencilState
      The field for the depthStencilState record component.
    • polygonMode

      private final Optional<PolygonMode> polygonMode
      The field for the polygonMode record component.
    • cull

      private final Optional<Boolean> cull
      The field for the cull record component.
    • vertexFormatPerBuffer

      private final @Nullable VertexFormat[] vertexFormatPerBuffer
      The field for the vertexFormatPerBuffer record component.
    • vertexFormatMode

      private final Optional<PrimitiveTopology> vertexFormatMode
      The field for the vertexFormatMode record component.
    • pushConstantSize

      private final int pushConstantSize
      The field for the pushConstantSize record component.
  • Constructor Details

    • Snippet

      public Snippet(Map<ShaderType, Identifier> shaders, Optional<ShaderDefines> shaderDefines, Optional<List<BindGroupLayout>> bindGroupLayouts, @Nullable ColorTargetState[] colorTargetStates, int activeColorTargetStateCount, Optional<DepthStencilState> depthStencilState, Optional<PolygonMode> polygonMode, Optional<Boolean> cull, @Nullable VertexFormat[] vertexFormatPerBuffer, Optional<PrimitiveTopology> vertexFormatMode, int pushConstantSize)
      Creates an instance of a Snippet record class.
      Parameters:
      shaders - the value for the shaders record component
      shaderDefines - the value for the shaderDefines record component
      bindGroupLayouts - the value for the bindGroupLayouts record component
      colorTargetStates - the value for the colorTargetStates record component
      activeColorTargetStateCount - the value for the activeColorTargetStateCount record component
      depthStencilState - the value for the depthStencilState record component
      polygonMode - the value for the polygonMode record component
      cull - the value for the cull record component
      vertexFormatPerBuffer - the value for the vertexFormatPerBuffer record component
      vertexFormatMode - the value for the vertexFormatMode record component
      pushConstantSize - the value for the pushConstantSize record component
  • Method Details

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

      public Map<ShaderType, Identifier> shaders()
      Returns the value of the shaders record component.
      Returns:
      the value of the shaders record component
    • shaderDefines

      public Optional<ShaderDefines> shaderDefines()
      Returns the value of the shaderDefines record component.
      Returns:
      the value of the shaderDefines record component
    • bindGroupLayouts

      public Optional<List<BindGroupLayout>> bindGroupLayouts()
      Returns the value of the bindGroupLayouts record component.
      Returns:
      the value of the bindGroupLayouts record component
    • colorTargetStates

      public @Nullable ColorTargetState[] colorTargetStates()
      Returns the value of the colorTargetStates record component.
      Returns:
      the value of the colorTargetStates record component
    • activeColorTargetStateCount

      public int activeColorTargetStateCount()
      Returns the value of the activeColorTargetStateCount record component.
      Returns:
      the value of the activeColorTargetStateCount record component
    • depthStencilState

      public Optional<DepthStencilState> depthStencilState()
      Returns the value of the depthStencilState record component.
      Returns:
      the value of the depthStencilState record component
    • polygonMode

      public Optional<PolygonMode> polygonMode()
      Returns the value of the polygonMode record component.
      Returns:
      the value of the polygonMode record component
    • cull

      public Optional<Boolean> cull()
      Returns the value of the cull record component.
      Returns:
      the value of the cull record component
    • vertexFormatPerBuffer

      public @Nullable VertexFormat[] vertexFormatPerBuffer()
      Returns the value of the vertexFormatPerBuffer record component.
      Returns:
      the value of the vertexFormatPerBuffer record component
    • vertexFormatMode

      public Optional<PrimitiveTopology> vertexFormatMode()
      Returns the value of the vertexFormatMode record component.
      Returns:
      the value of the vertexFormatMode record component
    • pushConstantSize

      public int pushConstantSize()
      Returns the value of the pushConstantSize record component.
      Returns:
      the value of the pushConstantSize record component