Class WrapperShaderBlockImpl

java.lang.Object
foundry.veil.impl.client.render.shader.definition.ShaderBlockImpl<Object>
foundry.veil.impl.client.render.shader.definition.WrapperShaderBlockImpl
All Implemented Interfaces:
DynamicShaderBlock<Object>, ShaderBlock<Object>, AutoCloseable, org.lwjgl.system.NativeResource

@Internal public class WrapperShaderBlockImpl extends ShaderBlockImpl<Object> implements DynamicShaderBlock<Object>
  • Constructor Details

    • WrapperShaderBlockImpl

      public WrapperShaderBlockImpl(int binding, int buffer)
  • Method Details

    • bind

      public void bind(int index)
      Description copied from class: ShaderBlockImpl
      Binds this block to the specified index.
      Specified by:
      bind in class ShaderBlockImpl<Object>
      Parameters:
      index - The index to bind this block to
    • unbind

      public void unbind(int index)
      Description copied from class: ShaderBlockImpl
      Unbinds this block from the specified index.
      Specified by:
      unbind in class ShaderBlockImpl<Object>
      Parameters:
      index - The index to unbind this block from
    • set

      public void set(@Nullable @Nullable Object value)
      Description copied from interface: ShaderBlock
      Sets the value of this block. Sets the value regardless if it has changed or not.
      Specified by:
      set in interface ShaderBlock<Object>
      Overrides:
      set in class ShaderBlockImpl<Object>
      Parameters:
      value - The new value
    • getValue

      @Nullable public @Nullable Object getValue()
      Specified by:
      getValue in interface ShaderBlock<Object>
      Overrides:
      getValue in class ShaderBlockImpl<Object>
      Returns:
      The value stored in this block
    • setSize

      public void setSize(long newSize)
      Description copied from interface: DynamicShaderBlock
      Resizes this shader block to match the new size.
      Specified by:
      setSize in interface DynamicShaderBlock<Object>
      Parameters:
      newSize - The size in bytes
    • free

      public void free()
      Specified by:
      free in interface org.lwjgl.system.NativeResource
      Overrides:
      free in class ShaderBlockImpl<Object>