projects
/
voxscape
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93c370a
)
adjust fov on aspect change
master
author
John Tsiombikas
<nuclear@member.fsf.org>
Mon, 7 Nov 2022 23:49:06 +0000
(
01:49
+0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Mon, 7 Nov 2022 23:49:06 +0000
(
01:49
+0200)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
bbe64fd
..
bebba84
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-82,7
+82,6
@@
int init(void)
return -1;
}
vox_framebuf(vox, FB_W, FB_H, fb);
- vox_proj(vox, 140, 45, 1, 300);
vox_fog(vox, 260, COLOR_HORIZON);
vox_filter(vox, hfilt, cfilt);
@@
-156,6
+155,10
@@
void idle(void)
void reshape(int x, int y)
{
+ float aspect = (float)x / y;
+
+ vox_proj(vox, 140, 40 * aspect, 1, 300);
+
glViewport(0, 0, x, y);
win_width = x;