Interface SourceResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Loads shader source text by a
/-separated name.-
Method Summary
Modifier and TypeMethodDescriptionstatic SourceResolverclasspath(ClassLoader loader, String root) Resolves names as class path resources under a root, through a class loader.static SourceResolverResolves names as files under a directory, which is what hot reload during development uses.default SourceResolveror(SourceResolver next) Tries this resolver, then another.Loads a file.
-
Method Details
-
resolve
-
classpath
Resolves names as class path resources under a root, through a class loader.- Parameters:
loader- the class loaderroot- the resource root, such as"lol/trq/helios/shaders"- Returns:
- the resolver
-
directory
Resolves names as files under a directory, which is what hot reload during development uses.- Parameters:
root- the directory- Returns:
- the resolver
-
or
Tries this resolver, then another.- Parameters:
next- the fallback- Returns:
- the combined resolver
-