Package icyllis.arc3d.core
Class SLDataType
java.lang.Object
icyllis.arc3d.core.SLDataType
Types of shader-language-specific boxed variables we can create, shared constants.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanBeUniformValue(byte type) Is the shading language type supported as a uniform block member.static booleancheckSLType(byte type) static booleanisBooleanType(byte type) Is the shading language type boolean (including vectors)?static booleanisCombinedSamplerType(byte type) static booleanisFloatType(byte type) Is the shading language type float (including vectors/matrices)?static booleanisIntegralType(byte type) Is the shading language type integral (including vectors)?static booleanisMatrixType(byte type) static intlocations(byte type) Returns the number of locations take up by a given SLType.static intmatrixOrder(byte type) If the type represents a square matrix, return its order; otherwise, -1.static StringtypeString(byte type) static intvectorDim(byte type) If the type represents a single value or vector return the number of components, else -1.
-
Field Details
-
kVoid
public static final byte kVoid- See Also:
-
kBool
public static final byte kBool- See Also:
-
kBool2
public static final byte kBool2- See Also:
-
kBool3
public static final byte kBool3- See Also:
-
kBool4
public static final byte kBool4- See Also:
-
kShort
public static final byte kShort- See Also:
-
kShort2
public static final byte kShort2- See Also:
-
kShort3
public static final byte kShort3- See Also:
-
kShort4
public static final byte kShort4- See Also:
-
kUShort
public static final byte kUShort- See Also:
-
kUShort2
public static final byte kUShort2- See Also:
-
kUShort3
public static final byte kUShort3- See Also:
-
kUShort4
public static final byte kUShort4- See Also:
-
kFloat
public static final byte kFloat- See Also:
-
kFloat2
public static final byte kFloat2- See Also:
-
kFloat3
public static final byte kFloat3- See Also:
-
kFloat4
public static final byte kFloat4- See Also:
-
kFloat2x2
public static final byte kFloat2x2- See Also:
-
kFloat3x3
public static final byte kFloat3x3- See Also:
-
kFloat4x4
public static final byte kFloat4x4- See Also:
-
kHalf
public static final byte kHalf- See Also:
-
kHalf2
public static final byte kHalf2- See Also:
-
kHalf3
public static final byte kHalf3- See Also:
-
kHalf4
public static final byte kHalf4- See Also:
-
kHalf2x2
public static final byte kHalf2x2- See Also:
-
kHalf3x3
public static final byte kHalf3x3- See Also:
-
kHalf4x4
public static final byte kHalf4x4- See Also:
-
kInt
public static final byte kInt- See Also:
-
kInt2
public static final byte kInt2- See Also:
-
kInt3
public static final byte kInt3- See Also:
-
kInt4
public static final byte kInt4- See Also:
-
kUInt
public static final byte kUInt- See Also:
-
kUInt2
public static final byte kUInt2- See Also:
-
kUInt3
public static final byte kUInt3- See Also:
-
kUInt4
public static final byte kUInt4- See Also:
-
kSampler2D
public static final byte kSampler2D- See Also:
-
kTexture2D
public static final byte kTexture2D- See Also:
-
kSampler
public static final byte kSampler- See Also:
-
kSubpassInput
public static final byte kSubpassInput- See Also:
-
kLast
public static final byte kLast- See Also:
-
-
Constructor Details
-
SLDataType
public SLDataType()
-
-
Method Details
-
checkSLType
public static boolean checkSLType(byte type) -
isFloatType
public static boolean isFloatType(byte type) Is the shading language type float (including vectors/matrices)? -
isIntegralType
public static boolean isIntegralType(byte type) Is the shading language type integral (including vectors)? -
isBooleanType
public static boolean isBooleanType(byte type) Is the shading language type boolean (including vectors)? -
canBeUniformValue
public static boolean canBeUniformValue(byte type) Is the shading language type supported as a uniform block member. -
vectorDim
public static int vectorDim(byte type) If the type represents a single value or vector return the number of components, else -1. -
matrixOrder
public static int matrixOrder(byte type) If the type represents a square matrix, return its order; otherwise, -1. -
isCombinedSamplerType
public static boolean isCombinedSamplerType(byte type) -
isMatrixType
public static boolean isMatrixType(byte type) -
locations
public static int locations(byte type) Returns the number of locations take up by a given SLType.16-bit scalar and vector types, and 32-bit scalar and vector types consume a single location.
n x m 16- or 32-bit matrix types consume n consecutive locations.
Returns 0 for opaque types.
-
typeString
-