Class Template<T>
java.lang.Object
com.jozufozu.flywheel.core.compile.Memoizer<SourceFile,T>
com.jozufozu.flywheel.core.compile.Template<T>
A class that generates glsl glue code given a SourceFile.
Shader files are written somewhat abstractly. Subclasses of Template handle those abstractions, using SourceFile metadata to generate shader code that OpenGL can use to call into our shader programs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected T_create(SourceFile key) protected voidapply(SourceFile file) Verify that the given SourceFile is valid for this Template and return the metadata.Methods inherited from class com.jozufozu.flywheel.core.compile.Memoizer
get, invalidate
-
Constructor Details
-
Template
-
-
Method Details
-
apply
Verify that the given SourceFile is valid for this Template and return the metadata.- Parameters:
file- The SourceFile to apply this Template to.- Returns:
- The applied template metadata.
-
getVersion
- Returns:
- The GLSL version this template requires.
-
_create
- Specified by:
_createin classMemoizer<SourceFile,T>
-
_destroy
- Specified by:
_destroyin classMemoizer<SourceFile,T>
-