aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-06-10 07:33:35 +0800
committerMistivia <i@mistivia.com>2025-06-10 07:33:35 +0800
commit2a5dcfb26f536d705a8f71548b24b2262ca7715e (patch)
tree183a497f90ba1a2c05a37a280a7afbdb91555f9b /src/main.c
parent2aff272bd665705ae70eb7a34fa658e45d65269d (diff)
anti alias
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 6e37e37..71ced79 100644
--- a/src/main.c
+++ b/src/main.c
@@ -143,8 +143,8 @@ Color calc_color(Vec3f v) {
int main() {
init_color();
- int img_w = 1280;
- int img_h = 720;
+ int img_w = 1280*2;
+ int img_h = 720*2;
Picture pic = new_picture(img_w, img_h);
for (int x = 0; x < img_w; x++) {
for (int y = 0; y < img_h; y++) {
@@ -153,8 +153,10 @@ int main() {
set_pixel(pic, screen_pos, calc_color(v));
}
}
- writeBMP("test.bmp", pic);
+ Picture newpic = picture_downscale_2x(pic);
+ writeBMP("test.bmp", newpic);
delete_picture(pic);
+ delete_picture(newpic);
return 0;
}