diff --git a/include/ak/core-types.h b/include/ak/core-types.h index 199509cd..25d14c1f 100644 --- a/include/ak/core-types.h +++ b/include/ak/core-types.h @@ -20,6 +20,8 @@ typedef const char *AkString; typedef char *AkMutString; typedef bool AkBool; +typedef int16_t AkInt16; +typedef uint16_t AkUInt16; typedef int32_t AkInt; typedef uint32_t AkUInt; typedef int64_t AkInt64; diff --git a/include/ak/type.h b/include/ak/type.h index 6c64a928..e7154f69 100644 --- a/include/ak/type.h +++ b/include/ak/type.h @@ -61,6 +61,7 @@ typedef enum AkTypeId { AKT_UBYTE = 30, AKT_SHORT = 31, AKT_USHORT = 32, + AKT_DOUBLE = 33, AKT_EFFECT, AKT_PROFILE, diff --git a/src/default/type.c b/src/default/type.c index 719b086f..dcae17eb 100644 --- a/src/default/type.c +++ b/src/default/type.c @@ -47,7 +47,21 @@ AkTypeDesc ak_def_type_descs[] = { {"sampler2D", AKT_SAMPLER2D, sizeof(AkSampler), 0}, - {NULL, 0, 0, 0} + /* for PLY */ + {"char", AKT_BYTE, sizeof(char), 0}, + {"uchar", AKT_UBYTE, sizeof(char), 0}, + {"double", AKT_DOUBLE, sizeof(AkDouble), 0}, + + {"int8", AKT_INT, sizeof(char), 0}, + {"uint8", AKT_UINT, sizeof(char), 0}, + {"int16", AKT_SHORT, sizeof(AkInt16), 0}, + {"uint16", AKT_USHORT, sizeof(AkUInt16), 0}, + {"int32", AKT_UINT, sizeof(AkInt), 0}, + {"uint32", AKT_UINT, sizeof(AkUInt), 0}, + {"float32", AKT_FLOAT, sizeof(AkFloat), 0}, + {"float64", AKT_DOUBLE, sizeof(AkDouble), 0}, + + {NULL, 0, 0, 0} }; const AkTypeDesc*