Enum Class DynamicBufferType

java.lang.Object
java.lang.Enum<DynamicBufferType>
foundry.veil.api.client.render.dynamicbuffer.DynamicBufferType
All Implemented Interfaces:
Serializable, Comparable<DynamicBufferType>, Constable

public enum DynamicBufferType extends Enum<DynamicBufferType>
Built-in dynamic buffers available to sample from.
  • Enum Constant Details

  • Field Details

    • BUFFERS

      @Internal public static final DynamicBufferType[] BUFFERS
    • CODEC

      public static final com.mojang.serialization.Codec<DynamicBufferType> CODEC
    • PACKED_LIST_CODEC

      public static final com.mojang.serialization.Codec<Integer> PACKED_LIST_CODEC
  • Method Details

    • values

      public static DynamicBufferType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DynamicBufferType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Returns:
      The code name of this type
    • getSourceName

      public String getSourceName()
      Returns:
      The name of this type inside the GLSL file
    • getType

      public io.github.ocelot.glslprocessor.api.grammar.GlslTypeSpecifier.BuiltinType getType()
      Returns:
      The data type stored in this buffer
    • getInternalFormat

      public int getInternalFormat()
      Returns:
      The internal format of the texture
    • getTexelFormat

      public int getTexelFormat()
      Returns:
      The format of data assigned to the texture
    • getMask

      public int getMask()
      Returns:
      The bit mask of this type
    • addMacros

      public static void addMacros(int mask, Map<String,String> map)
      Adds the standard buffer macros to the specified map.
      Parameters:
      mask - The mask of enabled buffers
      map - The map to add macros to
    • encode

      public static int encode(DynamicBufferType... types)
      Encodes the specified dynamic buffer types as a bit mask.
      Parameters:
      types - The types to encode
      Returns:
      An integer representing those buffer types
    • decode

      public static DynamicBufferType[] decode(int mask)
      Decodes the dynamic buffer types from the specified mask.
      Parameters:
      mask - The mask of buffers
      Returns:
      An array of all decoded buffers