Class WrapperShaderBlockImpl
java.lang.Object
foundry.veil.impl.client.render.shader.definition.ShaderBlockImpl<Object>
foundry.veil.impl.client.render.shader.definition.WrapperShaderBlockImpl
- All Implemented Interfaces:
DynamicShaderBlock<Object>
,ShaderBlock<Object>
,AutoCloseable
,org.lwjgl.system.NativeResource
@Internal
public class WrapperShaderBlockImpl
extends ShaderBlockImpl<Object>
implements DynamicShaderBlock<Object>
-
Field Summary
Fields inherited from class foundry.veil.impl.client.render.shader.definition.ShaderBlockImpl
binding, buffer, dirty, value
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(int index) Binds this block to the specified index.void
free()
@Nullable Object
getValue()
void
Sets the value of this block.void
setSize
(long newSize) Resizes this shader block to match the new size.void
unbind
(int index) Unbinds this block from the specified index.Methods inherited from class foundry.veil.impl.client.render.shader.definition.ShaderBlockImpl
getBinding
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
-
Constructor Details
-
WrapperShaderBlockImpl
public WrapperShaderBlockImpl(int binding, int buffer)
-
-
Method Details
-
bind
public void bind(int index) Description copied from class:ShaderBlockImpl
Binds this block to the specified index.- Specified by:
bind
in classShaderBlockImpl<Object>
- Parameters:
index
- The index to bind this block to
-
unbind
public void unbind(int index) Description copied from class:ShaderBlockImpl
Unbinds this block from the specified index.- Specified by:
unbind
in classShaderBlockImpl<Object>
- Parameters:
index
- The index to unbind this block from
-
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<Object>
- Overrides:
set
in classShaderBlockImpl<Object>
- Parameters:
value
- The new value
-
getValue
- Specified by:
getValue
in interfaceShaderBlock<Object>
- Overrides:
getValue
in classShaderBlockImpl<Object>
- Returns:
- The value stored in this block
-
setSize
public void setSize(long newSize) Description copied from interface:DynamicShaderBlock
Resizes this shader block to match the new size.- Specified by:
setSize
in interfaceDynamicShaderBlock<Object>
- Parameters:
newSize
- The size in bytes
-
free
public void free()- Specified by:
free
in interfaceorg.lwjgl.system.NativeResource
- Overrides:
free
in classShaderBlockImpl<Object>
-