Package dev.cammiescorner.velvet.impl
Class ResettableManagedShaderBase<S extends AutoCloseable>
java.lang.Object
dev.cammiescorner.velvet.impl.ResettableManagedShaderBase<S>
- All Implemented Interfaces:
UniformFinder
- Direct Known Subclasses:
ResettableManagedCoreShader,ResettableManagedShaderEffect
public abstract class ResettableManagedShaderBase<S extends AutoCloseable>
extends Object
implements UniformFinder
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResettableManagedShaderBase(net.minecraft.resources.ResourceLocation location) -
Method Summary
Modifier and TypeMethodDescriptionfindUniform1f(String uniformName) Finds a uniform declared in jsonfindUniform1i(String uniformName) Finds a uniform declared in jsonfindUniform2f(String uniformName) Finds a uniform declared in jsonfindUniform2i(String uniformName) Finds a uniform declared in jsonfindUniform3f(String uniformName) Finds a uniform declared in jsonfindUniform3i(String uniformName) Finds a uniform declared in jsonfindUniform4f(String uniformName) Finds a uniform declared in jsonfindUniform4i(String uniformName) Finds a uniform declared in jsonfindUniformMat4(String uniformName) Finds a uniform declared in jsonnet.minecraft.resources.ResourceLocationprotected Collection<ManagedUniformBase> protected voidinitialize(net.minecraft.server.packs.resources.ResourceProvider resourceManager) voidinitializeOrLog(net.minecraft.server.packs.resources.ResourceProvider mgr) booleanbooleanprotected abstract voidprotected <U extends ManagedUniformBase>
UmanageUniform(Map<String, U> uniformMap, Function<String, U> factory, String uniformName, String uniformKind) protected abstract SparseShader(net.minecraft.server.packs.resources.ResourceProvider resourceFactory, net.minecraft.client.Minecraft mc, net.minecraft.resources.ResourceLocation location) voidrelease()abstract voidsetup(int newWidth, int newHeight) protected abstract booleansetupUniform(ManagedUniformBase uniform, S shader) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.cammiescorner.velvet.api.managed.uniform.UniformFinder
findSampler
-
Field Details
-
shader
-
-
Constructor Details
-
ResettableManagedShaderBase
public ResettableManagedShaderBase(net.minecraft.resources.ResourceLocation location)
-
-
Method Details
-
initializeOrLog
@API(status=INTERNAL) public void initializeOrLog(net.minecraft.server.packs.resources.ResourceProvider mgr) -
logInitError
-
initialize
protected void initialize(net.minecraft.server.packs.resources.ResourceProvider resourceManager) throws IOException - Throws:
IOException
-
parseShader
protected abstract S parseShader(net.minecraft.server.packs.resources.ResourceProvider resourceFactory, net.minecraft.client.Minecraft mc, net.minecraft.resources.ResourceLocation location) throws IOException - Throws:
IOException
-
release
public void release() -
getManagedUniforms
-
setupUniform
-
isInitialized
public boolean isInitialized() -
isErrored
public boolean isErrored() -
getLocation
public net.minecraft.resources.ResourceLocation getLocation() -
manageUniform
-
findUniform1i
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform1iin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniform2i
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform2iin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniform3i
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform3iin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniform4i
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform4iin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniform1f
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform1fin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniform2f
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform2fin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniform3f
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform3fin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniform4f
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniform4fin interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
findUniformMat4
Description copied from interface:UniformFinderFinds a uniform declared in json- Specified by:
findUniformMat4in interfaceUniformFinder- Parameters:
uniformName- the name of the uniform field in the shader source file
-
setup
@API(status=INTERNAL) public abstract void setup(int newWidth, int newHeight) -
toString
-