|
sorry, unimplemented: non-trivial designated initializers |
AceBlkwell
Member #13,038
July 2011
|
All, I'm following the Vivace tutorial. I made to the ALLEGRO_VERTEX section. I compiled and got this error .\main.cpp:88:24: sorry, unimplemented: non-trivial designated initializers not supported 1 ALLEGRO_VERTEX v[] = {
2 { .x = 210, .y = 320, .z = 0, .color = al_map_rgb_f(1, 0, 0) },
3 { .x = 330, .y = 320, .z = 0, .color = al_map_rgb_f(0, 1, 0) },
4 { .x = 210, .y = 420, .z = 0, .color = al_map_rgb_f(0, 0, 1) },
5 { .x = 330, .y = 420, .z = 0, .color = al_map_rgb_f(1, 1, 0) },
6 };
The code obviously works or more people would be having a problem with it. I'm guessing it's the operator here. Any help would be appreciated. ** UPDATE ** I got it to work by removing the variables and leaving the values. I also had to add zeros for the float U and float v. 1ALLEGRO_VERTEX v[] = {
2 { 210, 320,0,0,0, al_map_rgb_f(1, 0, 0) },
3 { 330, 320,0,0,0, al_map_rgb_f(0, 1, 0) },
4 { 210, 420,0,0,0, al_map_rgb_f(0, 0, 1) },
5 { 330, 420,0,0,0, al_map_rgb_f(1, 1, 0) },
6 };
It might not have been the best option but it worked. I can continue on with tutorial. Chime in if there was a better way to handle. Thanks |
|