Class ShaderBlockImpl<T>
java.lang.Object
foundry.veil.impl.client.render.shader.block.ShaderBlockImpl<T>
- Type Parameters:
T- The type of object to serialize
- All Implemented Interfaces:
ShaderBlock<T>,AutoCloseable,org.lwjgl.system.NativeResource
- Direct Known Subclasses:
DynamicShaderBlockImpl,SizedShaderBlockImpl,WrapperShaderBlockImpl
Abstract implementation of
ShaderBlock.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface foundry.veil.api.client.render.shader.block.ShaderBlock
ShaderBlock.BufferBinding, ShaderBlock.MemoryLayout -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidbind(int index) Binds this block to the specified index.voidfree()intgetIndex()protected static ShaderBlockImpl.StorageTypegetValue()voidSets the value of this block.voidsetIndex(int index) abstract voidunbind(int index) Unbinds this block from the specified index.Methods 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
-
Field Details
-
binding
-
buffer
protected int buffer -
value
-
dirty
protected boolean dirty
-
-
Constructor Details
-
ShaderBlockImpl
-
-
Method Details
-
getStorageType
-
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<T>- Parameters:
value- The new value
-
bind
public abstract void bind(int index) Binds this block to the specified index.- Parameters:
index- The index to bind this block to
-
unbind
public abstract void unbind(int index) Unbinds this block from the specified index.- Parameters:
index- The index to unbind this block from
-
getBinding
-
getIndex
public int getIndex() -
getValue
- Specified by:
getValuein interfaceShaderBlock<T>- Returns:
- The value stored in this block
-
setIndex
public void setIndex(int index) -
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-