Skip to content

Commit

Permalink
define a few types for PLY format
Browse files Browse the repository at this point in the history
  • Loading branch information
recp committed Jul 14, 2020
1 parent cdfa662 commit 60f4fac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/ak/core-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions include/ak/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ typedef enum AkTypeId {
AKT_UBYTE = 30,
AKT_SHORT = 31,
AKT_USHORT = 32,
AKT_DOUBLE = 33,

AKT_EFFECT,
AKT_PROFILE,
Expand Down
16 changes: 15 additions & 1 deletion src/default/type.c
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down

0 comments on commit 60f4fac

Please sign in to comment.