Some context: iOS app development. Objective-C code in Xcode.
This one has been confounding me for hours:
I have a little struct I created:
struct EIVertex {
GLKVector3 P;
GLKVector3 N;
GLKVector3 barycentric;
GLKVector2 st;
};
GLKVector3
and GLKVector2
are types found in the GLKit framework.
Here is what is weird:
sizeof(GLKVector2) = 8
sizeof(GLKVector3) = 12
sizeof(EIVertex) = 48
The size for EIVertex
is 48 but should be 44 (12 + 12 + 12 + 8 = 44).
Can someone please explain why there is this size disparity?