diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-29 11:52:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-29 11:54:23 +0300 |
commit | 2343dcf0d272c0cbc3f185d674eb93d24b4f29e7 (patch) | |
tree | e0e31a9f58e22f1b520c08c28358bd675d06ad3a /intern/gawain | |
parent | 2113dbb013f3ee37207c8ec3260d037c8a29f4c8 (diff) |
Gawain: Use common prefix for packed normal
Diffstat (limited to 'intern/gawain')
-rw-r--r-- | intern/gawain/gawain/vertex_format.h | 6 | ||||
-rw-r--r-- | intern/gawain/src/vertex_format.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/intern/gawain/gawain/vertex_format.h b/intern/gawain/gawain/vertex_format.h index 3b2a3be4209..ab61722db60 100644 --- a/intern/gawain/gawain/vertex_format.h +++ b/intern/gawain/gawain/vertex_format.h @@ -72,7 +72,7 @@ typedef struct { int y : 10; int z : 10; int w : 2; // 0 by default, can manually set to { -2, -1, 0, 1 } -} PackedNormal; +} Gwn_PackedNormal; -PackedNormal convert_i10_v3(const float data[3]); -PackedNormal convert_i10_s3(const short data[3]); +Gwn_PackedNormal GWN_normal_convert_i10_v3(const float data[3]); +Gwn_PackedNormal GWN_normal_convert_i10_s3(const short data[3]); diff --git a/intern/gawain/src/vertex_format.c b/intern/gawain/src/vertex_format.c index 139a76cf7ef..34704db3359 100644 --- a/intern/gawain/src/vertex_format.c +++ b/intern/gawain/src/vertex_format.c @@ -251,7 +251,7 @@ void VertexFormat_pack(Gwn_VertFormat* format) // OpenGL ES packs in a different order as desktop GL but component conversion is the same. -// Of the code here, only struct PackedNormal needs to change. +// Of the code here, only struct Gwn_PackedNormal needs to change. #define SIGNED_INT_10_MAX 511 #define SIGNED_INT_10_MIN -512 @@ -283,14 +283,14 @@ static int convert_i16(short x) // TODO: round? } -PackedNormal convert_i10_v3(const float data[3]) +Gwn_PackedNormal GWN_normal_convert_i10_v3(const float data[3]) { - PackedNormal n = { .x = quantize(data[0]), .y = quantize(data[1]), .z = quantize(data[2]) }; + Gwn_PackedNormal n = { .x = quantize(data[0]), .y = quantize(data[1]), .z = quantize(data[2]) }; return n; } -PackedNormal convert_i10_s3(const short data[3]) +Gwn_PackedNormal GWN_normal_convert_i10_s3(const short data[3]) { - PackedNormal n = { .x = convert_i16(data[0]), .y = convert_i16(data[1]), .z = convert_i16(data[2]) }; + Gwn_PackedNormal n = { .x = convert_i16(data[0]), .y = convert_i16(data[1]), .z = convert_i16(data[2]) }; return n; } |