Does anyone know of a program that will let you draw a graphic object,
and then auto generate structures like this to use in a GU program?
Code: Select all
Vertex __attribute__((aligned(16))) cube[3*12] =
{
{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ),-1.0f, 1.0f,-1.0f }, // Top
{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ), 1.0f, 1.0f,-1.0f },
{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ),-1.0f, 1.0f, 1.0f },
{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ),-1.0f, 1.0f, 1.0f },
{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ), 1.0f, 1.0f,-1.0f },
{ GU_COLOR( 0.0f, 1.0f, 0.0f, 0.0f ), 1.0f, 1.0f, 1.0f },
{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ),-1.0f,-1.0f, 1.0f }, // Bottom
{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ), 1.0f,-1.0f, 1.0f },
{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ),-1.0f,-1.0f,-1.0f },
{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ),-1.0f,-1.0f,-1.0f },
{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ), 1.0f,-1.0f, 1.0f },
{ GU_COLOR( 1.0f, 0.5f, 0.0f, 0.0f ), 1.0f,-1.0f,-1.0f },
{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ),-1.0f, 1.0f, 1.0f }, // Front
{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ), 1.0f, 1.0f, 1.0f },
{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ),-1.0f,-1.0f, 1.0f },
{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ),-1.0f,-1.0f, 1.0f },
{ GU_COLOR( 1.0f, 0.0f, 0.0f, 0.0f ), 1.0f, 1.0f, 1.0f },
{ GU_COLOR( 1.0f,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