ie..
static unsigned int __attribute__((aligned(16))) list[262144];
but what if you want to do it dynamically?
given the below, how could i modify the line to be 16 byte aligned?
MESH *pMesh;
... allocate mesh ...
pMesh->pVerticies = ( VTX ) calloc( sizeof( VTX ) , nVerticies );
______ structure definitions below_____________
Code: Select all
typedef struct XlVertex
{
	float u, v;
	float x, y, z;
} *VTX; // 5 floats * 4 bytes = 20 bytes per vertex
typedef struct MeshNode
{
	int nTriangles;
	int nVerticies;
	int nIndicies;
	int nMeshId;
	char szMeshName[256];
	vtx pVerticies;
	unsigned short *pIndicies;
	MeshNode*pNext;
} *MESH;
