Interface ShaderLoader

All Known Implementing Classes:
ValidatingShaderLoader

public interface ShaderLoader
A ShaderLoader simplifies the process of loading, creating and linking OpenGL shader objects
Since:
1.0.0
  • Method Summary

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

    • getInstance

      @API(status=MAINTAINED) static ShaderLoader getInstance()
    • loadShader

      @API(status=MAINTAINED) int loadShader(net.minecraft.server.packs.resources.ResourceProvider resourceProvider, @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
      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
      ShaderLinkException - if the shader fails to be linked