Enum Class ShaderFeature
- All Implemented Interfaces:
Serializable
,Comparable<ShaderFeature>
,Constable
Shader features allow a higher-level way of requesting GLSL functionality without having to manually enable extensions per-shader.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ShaderFeature> static final ShaderFeature[]
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
modifyShader
(io.github.ocelot.glslprocessor.api.node.GlslTree tree) Modifies the specified shader source to add the required GLSL extensions.static ShaderFeature
Returns the enum constant of this class with the specified name.static ShaderFeature[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMPUTE
-
SHADER_STORAGE
-
ATOMIC_COUNTER
-
BINDLESS_TEXTURE
-
CUBE_MAP_ARRAY
- Since:
- 2.1.0
-
-
Field Details
-
FEATURES
-
CODEC
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isSupported
public boolean isSupported()- Returns:
- Whether this feature is supported on this platform
-
getDefinitionName
- Returns:
- The shader definition name in GLSL code
-
modifyShader
public void modifyShader(io.github.ocelot.glslprocessor.api.node.GlslTree tree) Modifies the specified shader source to add the required GLSL extensions.- Parameters:
tree
- The tree to modify
-