What is wrong with this code:
Vertex *transformIntoVertex(float *v, int size){
int i;
float x_axis = x_0 + (x_Max/size);
Vertex *axisVertices2[9];
for(i = 0; i < size; ++i){
axisVertices2[i] = {{ 0.0f, 0.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 1.0f, 1.0f }};
}
return axisVertices2; }
typedef struct
{
float XYZW[4];
float RGBA[4];
} Vertex;
I am getting this error:
error C2059: syntax error : '{'
The error is on this line:
axisVertices2[i] = {{ 0.0f, 0.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 1.0f, 1.0f }};
Can you suggest me a macro to fill in with my custom values, i must use constants cannot use variables