Class WrapperShaderBlockImpl
java.lang.Object
foundry.veil.impl.client.render.shader.block.ShaderBlockImpl<Object>
foundry.veil.impl.client.render.shader.block.WrapperShaderBlockImpl
- All Implemented Interfaces:
DynamicShaderBlock<Object>,ShaderBlock<Object>,AutoCloseable,org.lwjgl.system.NativeResource
@Internal
public class WrapperShaderBlockImpl
extends ShaderBlockImpl<Object>
implements DynamicShaderBlock<Object>
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(int index) Binds this block to the specified index.voidfree()intgetSize()@Nullable ObjectgetValue()voidSets the value of this block.voidsetSize(int newSize) Resizes this shader block to match the new size.voidunbind(int index) Unbinds this block from the specified index.Methods inherited from class foundry.veil.impl.client.render.shader.block.ShaderBlockImpl
getBinding, getIndex, getStorageType, 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
update
-
Constructor Details
-
WrapperShaderBlockImpl
-
-
Method Details
-
bind
public void bind(int index) Description copied from class:ShaderBlockImplBinds this block to the specified index.- Specified by:
bindin classShaderBlockImpl<Object>- 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<Object>- Parameters:
index- The index to unbind this block from
-
set
Description copied from interface:ShaderBlockSets the value of this block. Sets the value regardless if it has changed or not.- Specified by:
setin interfaceShaderBlock<Object>- Overrides:
setin classShaderBlockImpl<Object>- Parameters:
value- The new value
-
getValue
- Specified by:
getValuein interfaceShaderBlock<Object>- Overrides:
getValuein classShaderBlockImpl<Object>- Returns:
- The value stored in this block
-
getSize
public int getSize()- Specified by:
getSizein interfaceDynamicShaderBlock<Object>- Returns:
- The size of this block in bytes
-
setSize
public void setSize(int newSize) Description copied from interface:DynamicShaderBlockResizes this shader block to match the new size.- Specified by:
setSizein interfaceDynamicShaderBlock<Object>- Parameters:
newSize- The size in bytes
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource- Overrides:
freein classShaderBlockImpl<Object>
-