public class ShaderUtils
extends java.lang.Object
Constructor and Description |
---|
ShaderUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
convertToGLSL130(java.lang.String input,
boolean isFrag) |
static int |
getCardinality(java.lang.String type,
java.lang.String swizzling)
return the cardinality of a type and a swizzle example : vec4 cardinality
is 4 float cardinality is 1 vec4.xyz cardinality is 3.
|
static boolean |
isSwizzlable(java.lang.String type)
returns true if a variable of the given type can have a swizzle
|
static boolean |
multiplicityMatch(VariableMapping mapping)
Check if a mapping is valid by checking the multiplicity of both of
the variables if they are arrays
|
static boolean |
typesMatch(VariableMapping mapping)
Check if a mapping is valid by checking the types and swizzle of both of
the variables
|
public static java.lang.String convertToGLSL130(java.lang.String input, boolean isFrag)
public static boolean typesMatch(VariableMapping mapping)
mapping
- the mappingpublic static boolean multiplicityMatch(VariableMapping mapping)
mapping
- the mappingpublic static int getCardinality(java.lang.String type, java.lang.String swizzling)
type
- the glsl typeswizzling
- the swizzling of a variablepublic static boolean isSwizzlable(java.lang.String type)
type
- the glsl type