Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public enum ShaderType
- Object
- Enum<ShaderType>
- ShaderType
ImplementsComparable<ShaderType>
The value type of a
ShaderNode. Every shading language the backends
target has these four, so a graph typed with them prints the same way on
all of them.Enum constants
FLOAT | One float. |
VEC2 | Two floats. |
VEC3 | Three floats: a position, a direction or a colour. |
VEC4 | Four floats: a colour with alpha, or a sampled texel. |
Methods
public static ShaderType[] values() | |
public static ShaderType valueOf(String name) | |
public int getComponents() | Returns the number of float components, 1 to 4. |
public static ShaderType ofComponents(int n) | Returns the type with the given number of components. |
Inherited methods
Enum constant details
FLOAT
FLOATOne float.
VEC2
VEC2Two floats.
VEC3
VEC3Three floats: a position, a direction or a colour.
VEC4
VEC4Four floats: a colour with alpha, or a sampled texel.
Method details
values
public static ShaderType[] values()valueOf
public static ShaderType valueOf(String name)getComponents
public int getComponents()Returns the number of float components, 1 to 4.
Returns
the component count
ofComponents
public static ShaderType ofComponents(int n)Returns the type with the given number of components.
Parameters
nint- 1 to 4
Returns
the matching type