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
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.lwjgl.system.NativeResource
close
Methods 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:ShaderBlock
Sets the value of this block. Sets the value regardless if it has changed or not.- Specified by:
set
in 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:
getValue
in interfaceShaderBlock<T>
- Returns:
- The value stored in this block
-
free
public void free()- Specified by:
free
in interfaceorg.lwjgl.system.NativeResource
-