Package icyllis.arc3d.engine
Class ShaderVar
java.lang.Object
icyllis.arc3d.engine.ShaderVar
Represents a variable in a shader.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteTypeModifiersstatic final byteTypeModifiersstatic final intValues for array length that have special meaning.static final byteTypeModifiersstatic final byteTypeModifiersstatic final byteTypeModifiers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutQualifier(String layoutQualifier) Appends to the layout qualifier.voidaddLayoutQualifier(String qualifier, int value) Appends to the layout qualifier.voidaddModifier(String modifier) Appends to the modifiers.voidappendDecl(StringBuilder out) Write a declaration of this variable to out.intGet the array length.getName()Get the name.bytegetType()Get the type.bytebooleanisArray()Is the var an array.voidSets as a non-array.voidsetTypeModifier(byte typeModifier)
-
Field Details
-
kNone_TypeModifier
public static final byte kNone_TypeModifierTypeModifiers- See Also:
-
kOut_TypeModifier
public static final byte kOut_TypeModifierTypeModifiers- See Also:
-
kIn_TypeModifier
public static final byte kIn_TypeModifierTypeModifiers- See Also:
-
kInOut_TypeModifier
public static final byte kInOut_TypeModifierTypeModifiers- See Also:
-
kUniform_TypeModifier
public static final byte kUniform_TypeModifierTypeModifiers- See Also:
-
kNonArray
public static final int kNonArrayValues for array length that have special meaning. We allow 1-sized arrays.- See Also:
-
-
Constructor Details
-
ShaderVar
public ShaderVar()Defaults to a void with no type modifier or layout qualifier. -
ShaderVar
-
ShaderVar
-
ShaderVar
-
ShaderVar
-
ShaderVar
-
-
Method Details
-
set
Sets as a non-array. Internally used with the default constructor. -
isArray
public boolean isArray()Is the var an array. -
getArraySize
public int getArraySize()Get the array length. May bekNonArray. -
getName
Get the name. -
getType
public byte getType()Get the type.- See Also:
-
getTypeModifier
public byte getTypeModifier() -
setTypeModifier
public void setTypeModifier(byte typeModifier) -
addLayoutQualifier
Appends to the layout qualifier. -
addLayoutQualifier
Appends to the layout qualifier. -
addModifier
Appends to the modifiers. -
appendDecl
Write a declaration of this variable to out.
-