Class DynamicShaderBlockImpl<T>
java.lang.Object
foundry.veil.impl.client.render.shader.block.ShaderBlockImpl<T>
foundry.veil.impl.client.render.shader.block.DynamicShaderBlockImpl<T>
- All Implemented Interfaces:
DynamicShaderBlock<T>,ShaderBlock<T>,AutoCloseable,org.lwjgl.system.NativeResource
@Internal
public class DynamicShaderBlockImpl<T>
extends ShaderBlockImpl<T>
implements DynamicShaderBlock<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class foundry.veil.impl.client.render.shader.block.ShaderBlockImpl
ShaderBlockImpl.StorageTypeNested classes/interfaces inherited from interface foundry.veil.api.client.render.shader.block.ShaderBlock
ShaderBlock.BufferBinding, ShaderBlock.MemoryLayout -
Field Summary
Fields inherited from class foundry.veil.impl.client.render.shader.block.ShaderBlockImpl
binding, buffer, dirty, value -
Constructor Summary
ConstructorsConstructorDescriptionDynamicShaderBlockImpl(ShaderBlock.BufferBinding binding, int initialSize, BiConsumer<T, ByteBuffer> serializer) -
Method Summary
Methods inherited from class foundry.veil.impl.client.render.shader.block.ShaderBlockImpl
getBinding, getIndex, getStorageType, getValue, set, setIndexMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.lwjgl.system.NativeResource
closeMethods inherited from interface foundry.veil.api.client.render.shader.block.ShaderBlock
getValue, set, update
-
Constructor Details
-
DynamicShaderBlockImpl
public DynamicShaderBlockImpl(ShaderBlock.BufferBinding binding, int initialSize, BiConsumer<T, ByteBuffer> serializer)
-
-
Method Details
-
getSize
public int getSize()- Specified by:
getSizein interfaceDynamicShaderBlock<T>- Returns:
- The size of this block in bytes
-
setSize
public void setSize(int size) Description copied from interface:DynamicShaderBlockResizes this shader block to match the new size.- Specified by:
setSizein interfaceDynamicShaderBlock<T>- Parameters:
size- The size in bytes
-
bind
public void bind(int index) Description copied from class:ShaderBlockImplBinds this block to the specified index.- Specified by:
bindin classShaderBlockImpl<T>- Parameters:
index- The index to bind this block to
-
unbind
public void unbind(int index) Description copied from class:ShaderBlockImplUnbinds this block from the specified index.- Specified by:
unbindin classShaderBlockImpl<T>- Parameters:
index- The index to unbind this block from
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource- Overrides:
freein classShaderBlockImpl<T>
-