spectral

struct alignment question

Discussion created by spectral on Feb 23, 2010
Latest reply on Feb 25, 2010 by spectral

Hi,

Can I do this ? Or should I align the AABB struct too ?

 

typedef struct __attribute__ ((packed)) _AABB { float MinX, MinY, MinZ, MaxX, MaxY, MaxZ; } AABB; typedef struct __attribute__ ((packed)) _BoundingVolume { AABB BBox; int SkipNodeIndex; int PrimitiveId; ushort Count; ushort pad1; int pad2; int pad3; int pad4; } BoundingVolume; BoundingVolume * list; list[15].Count = 10;

Outcomes