summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/controller/set_ortho.c26
-rw-r--r--src/controller/set_ortho.h11
2 files changed, 37 insertions, 0 deletions
diff --git a/src/controller/set_ortho.c b/src/controller/set_ortho.c
new file mode 100644
index 0000000..75af6a6
--- a/dev/null
+++ b/src/controller/set_ortho.c
@@ -0,0 +1,26 @@
1#include "set_ortho.h"
2#include "../view/exp004state0.h"
3#include <GL/glut.h>
4
5#define S exp004state0
6
7void
8set_ortho (void)
9{
10 if (S.zoom.active)
11 {
12 gluOrtho2D (S.zoom.coords[0],
13 S.zoom.coords[1],
14 S.zoom.coords[2],
15 S.zoom.coords[3]);
16 }
17 else
18 {
19 gluOrtho2D (S.ortho.min_x,
20 S.ortho.max_x,
21 S.ortho.min_y,
22 S.ortho.max_y);
23 }
24
25 return;
26}

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.