Package dev.cammiescorner.velvet.impl
Class ValidatingShaderLoader
java.lang.Object
dev.cammiescorner.velvet.impl.ValidatingShaderLoader
- All Implemented Interfaces:
ShaderLoader
A
ShaderLoader that validates loaded GLSL code and logs errors-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintloadShader(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
-
Field Details
-
INSTANCE
-
-
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:
loadShaderin interfaceShaderLoader- Parameters:
vertexLocation- the name or relative location of the vertex shaderfragmentLocation- 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
-