How to define the model dynamically?
I know the normal way...
Vertex __attribute__((aligned(16))) pyramid[3*1] =
{
{ 0x000000ff, -0.811853955937f, 0.445342652067f, 0.445342652067f},
{ 0x000000ff, -0.523709643896f, 0.307797283808f, 0.0f },
{ 0x000000ff, -0.811853955937f, 0.890685304134f, 0.0f }
};
But I would like to use fill the values of my variable pyramid dynamically. Something like:
Vertex __attribute__((aligned(16))) pyramid[3*1];
pyramid[0].color = VariableA;
pyramid[0].x = VariableB;
pyramid[0].y = VariableC;
pyramid[0].z = VariableD;
pyramid[1].color = VariableE;
pyramid[1].x = VariableF;
pyramid[1].y = VariableG;
pyramid[1].z = VariableH;
pyramid[2].color = VariableI;
pyramid[2].x = VariableJ;
pyramid[2].y = VariableK;
pyramid[2].z = VariableL;
Thanks...