Class ShaderBlockImpl<T>
java.lang.Object
foundry.veil.impl.client.render.shader.definition.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.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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.definition.ShaderBlock
update
-
Field Details
-
binding
protected final int binding -
buffer
protected int buffer -
value
-
dirty
protected boolean dirty
-
-
Constructor Details
-
ShaderBlockImpl
protected ShaderBlockImpl(int binding)
-
-
Method Details
-
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
public int getBinding() -
getValue
- Specified by:
getValuein interfaceShaderBlock<T>- Returns:
- The value stored in this block
-
free
public void free()- Specified by:
freein interfaceorg.lwjgl.system.NativeResource
-