Not dynamic:
Code: Select all
...
f32 verts[] ATTRIBUTE_ALIGN(32) = {
-1.0F, 0.0F, -1.5F,
1.0F, -0.0F, -1.0F,
-1.0F, -0.6F, 0.0F
};
u8 colors[] ATTRIBUTE_ALIGN(32) = {
0, 255, 255, 255
};
GX_SetArray(GX_VA_POS, verts, 3 * sizeof(f32));
GX_SetArray(GX_VA_CLR0, colors, 4 * sizeof(u8));
...
Code: Select all
...
u8 *vertsp = (f32*)(memalign(32, 9 * sizeof(f32)));
u8 *colorsp = (u8*)(memalign(32, 4 * sizeof(u8)));
for(int i = 0; i < 9; i++) {
vertsp[i] = verts[i];
}
for(int i = 0; i < 4; i++) {
colorsp[i] = colors[i];
}
GX_SetArray(GX_VA_POS, vertsp, 3 * sizeof(f32));
GX_SetArray(GX_VA_CLR0, colorsp, 4 * sizeof(u8));
...
I am guessing this has something to do with the way the Wii handles dynamic memory compared to Dolphin.
How would I make this work on the Wii?