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(Identifier id, VertexFormat vertexFormat, Consumer<Shader> loadCallback)
    Creates and registers a core shader program.
  • Method Details

    • register

      void register(Identifier id, VertexFormat vertexFormat, Consumer<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