Class ValidatingShaderLoader

java.lang.Object
dev.cammiescorner.velvet.impl.ValidatingShaderLoader
All Implemented Interfaces:
ShaderLoader

public final class ValidatingShaderLoader extends Object implements ShaderLoader
A ShaderLoader that validates loaded GLSL code and logs errors
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ShaderLoader
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    loadShader(net.minecraft.server.packs.resources.ResourceProvider resourceManager, @Nullable net.minecraft.resources.ResourceLocation vertexLocation, @Nullable net.minecraft.resources.ResourceLocation fragmentLocation)
    Initializes a program from a fragment and a vertex source file

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ValidatingShaderLoader

      public ValidatingShaderLoader()
  • Method Details

    • loadShader

      public int loadShader(net.minecraft.server.packs.resources.ResourceProvider resourceManager, @Nullable @Nullable net.minecraft.resources.ResourceLocation vertexLocation, @Nullable @Nullable net.minecraft.resources.ResourceLocation fragmentLocation) throws IOException
      Initializes a program from a fragment and a vertex source file
      Specified by:
      loadShader in interface ShaderLoader
      Parameters:
      vertexLocation - the name or relative location of the vertex shader
      fragmentLocation - the name or relative location of the fragment shader
      Returns:
      the reference to the initialized program
      Throws:
      IOException - If an I/O error occurs while reading the shader source files