rendered paste body#include <stdio.h>
#include <math.h>
int main(int argc, char **argv) {
int *vertices;
float *colors;
int width = atoi(argv[1]);
int height = atoi(argv[2]);
vertices = malloc((height * width * 2) * sizeof(int) + 1);
int x, y, i = 0;
for(x = 0; x < width; x++) {
for(y = 0; y < height; y++) {
vertices[i++] = x;
vertices[i++] = y;
}
}
colors = malloc((height * width * 3) * sizeof(float) + 1);
i = 0;
for(x = 0; x < width; x++) {
for(y = 0; y < height; y++) {
float temp = 1.0;
colors[i++] = temp;
colors[i++] = temp;
colors[i++] = temp;
}
}
for(i = 0, x = 0, y=0; i < (height * width); i++ )
printf("%d, %d : %f %f %f\n", vertices[x++], vertices[x++], colors[y++], colors[y++], colors[y++]);
}