Use blit for example
This commit is contained in:
parent
08edc234f9
commit
23e3edda06
@ -15,6 +15,7 @@ int main(int argc, char *argv[]) {
|
|||||||
res.width = 640;
|
res.width = 640;
|
||||||
res.height = 480;
|
res.height = 480;
|
||||||
res.depth = 32;
|
res.depth = 32;
|
||||||
|
unigi_type_color pixels[res.width * res.height];
|
||||||
unigi_type_resolution_2d_coord x;
|
unigi_type_resolution_2d_coord x;
|
||||||
unigi_type_resolution_2d_coord y;
|
unigi_type_resolution_2d_coord y;
|
||||||
unigi_type_resolution_1d_coord max = res.width * res.height;
|
unigi_type_resolution_1d_coord max = res.width * res.height;
|
||||||
@ -28,13 +29,16 @@ int main(int argc, char *argv[]) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for (y = 0; y < res.height; y++) {
|
for (y = 0; y < res.height; y++) {
|
||||||
for (x = 0; x < res.width; x++) {
|
for (x = 0; x < res.width; x++) {
|
||||||
//unigi_graphics_draw((y * res.width) + x,(t + (x ^ y)) + y);
|
//unigi_graphics_draw((y * res.width) + x,(t + (x ^ y)) + y);
|
||||||
unigi_graphics_draw((((y * res.width) + x) + t) % max,(t + (x ^ y)) + y);
|
//unigi_graphics_draw((((y * res.width) + x) + t) % max,(t + (x ^ y)) + y);
|
||||||
|
pixels[(((y * res.width) + x) + t) % max] = (t + (x ^ y)) + y;
|
||||||
}
|
}
|
||||||
t2++;
|
t2++;
|
||||||
}
|
}
|
||||||
|
unigi_graphics_blit(0,&pixels,res.width * res.height);
|
||||||
unigi_graphics_flush();
|
unigi_graphics_flush();
|
||||||
t++;
|
t++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user