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 TypeMethodDescriptionvoid
register
(Identifier id, VertexFormat vertexFormat, Consumer<ShaderProgram> loadCallback) Creates and registers a core shader program.
-
Method Details
-
register
void register(Identifier id, VertexFormat vertexFormat, Consumer<ShaderProgram> 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 IDvertexFormat
- the vertex format used by the shaderloadCallback
- a callback that is called when the shader program has been successfully loaded- Throws:
IOException
-