Interface CoreShaderRegistrationCallback.RegistrationContext

Enclosing interface:
CoreShaderRegistrationCallback

@NonExtendable public static interface CoreShaderRegistrationCallback.RegistrationContext
A context object used to create and register core shader programs.

This is not meant for implementation by users of the API.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    register(net.minecraft.util.Identifier id, net.minecraft.client.render.VertexFormat vertexFormat, Consumer<net.minecraft.client.render.Shader> loadCallback)
    Creates and registers a core shader program.
  • Method Details

    • register

      void register(net.minecraft.util.Identifier id, net.minecraft.client.render.VertexFormat vertexFormat, Consumer<net.minecraft.client.render.Shader> loadCallback) throws IOException
      Creates and registers a core shader program.

      The program is loaded from assets/<namespace>/shaders/core/<path>.json.

      Parameters:
      id - the program ID
      vertexFormat - the vertex format used by the shader
      loadCallback - a callback that is called when the shader program has been successfully loaded
      Throws:
      IOException