Skip to content

Commit 60f4fac

Browse files
committed
define a few types for PLY format
1 parent cdfa662 commit 60f4fac

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

include/ak/core-types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
typedef const char *AkString;
2121
typedef char *AkMutString;
2222
typedef bool AkBool;
23+
typedef int16_t AkInt16;
24+
typedef uint16_t AkUInt16;
2325
typedef int32_t AkInt;
2426
typedef uint32_t AkUInt;
2527
typedef int64_t AkInt64;

include/ak/type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ typedef enum AkTypeId {
6161
AKT_UBYTE = 30,
6262
AKT_SHORT = 31,
6363
AKT_USHORT = 32,
64+
AKT_DOUBLE = 33,
6465

6566
AKT_EFFECT,
6667
AKT_PROFILE,

src/default/type.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,21 @@ AkTypeDesc ak_def_type_descs[] = {
4747

4848
{"sampler2D", AKT_SAMPLER2D, sizeof(AkSampler), 0},
4949

50-
{NULL, 0, 0, 0}
50+
/* for PLY */
51+
{"char", AKT_BYTE, sizeof(char), 0},
52+
{"uchar", AKT_UBYTE, sizeof(char), 0},
53+
{"double", AKT_DOUBLE, sizeof(AkDouble), 0},
54+
55+
{"int8", AKT_INT, sizeof(char), 0},
56+
{"uint8", AKT_UINT, sizeof(char), 0},
57+
{"int16", AKT_SHORT, sizeof(AkInt16), 0},
58+
{"uint16", AKT_USHORT, sizeof(AkUInt16), 0},
59+
{"int32", AKT_UINT, sizeof(AkInt), 0},
60+
{"uint32", AKT_UINT, sizeof(AkUInt), 0},
61+
{"float32", AKT_FLOAT, sizeof(AkFloat), 0},
62+
{"float64", AKT_DOUBLE, sizeof(AkDouble), 0},
63+
64+
{NULL, 0, 0, 0}
5165
};
5266

5367
const AkTypeDesc*

0 commit comments

Comments
 (0)