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 Details

  • 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

      protected abstract void logInitError(IOException e)
    • 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

      protected Collection<ManagedUniformBase> getManagedUniforms()
    • setupUniform

      protected abstract boolean setupUniform(ManagedUniformBase uniform, S shader)
    • isInitialized

      public boolean isInitialized()
    • isErrored

      public boolean isErrored()
    • getLocation

      public net.minecraft.resources.ResourceLocation getLocation()
    • manageUniform

      protected <U extends ManagedUniformBase> U manageUniform(Map<String,U> uniformMap, Function<String,U> factory, String uniformName, String uniformKind)
    • findUniform1i

      public Uniform1i findUniform1i(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform1i in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniform2i

      public Uniform2i findUniform2i(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform2i in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniform3i

      public Uniform3i findUniform3i(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform3i in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniform4i

      public Uniform4i findUniform4i(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform4i in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniform1f

      public Uniform1f findUniform1f(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform1f in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniform2f

      public Uniform2f findUniform2f(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform2f in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniform3f

      public Uniform3f findUniform3f(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform3f in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniform4f

      public Uniform4f findUniform4f(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniform4f in interface UniformFinder
      Parameters:
      uniformName - the name of the uniform field in the shader source file
    • findUniformMat4

      public UniformMat4 findUniformMat4(String uniformName)
      Description copied from interface: UniformFinder
      Finds a uniform declared in json
      Specified by:
      findUniformMat4 in interface UniformFinder
      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

      public String toString()
      Overrides:
      toString in class Object