git.ucc.asn.au
/
atyndall
/
cits2231.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edd4488
)
(no commit message)
author
Ash Tyndall
<
[email protected]
>
Tue, 18 Oct 2011 12:52:04 +0000
(20:52 +0800)
committer
Ash Tyndall
<
[email protected]
>
Tue, 18 Oct 2011 12:52:04 +0000
(20:52 +0800)
scene.c
patch
|
blob
|
history
diff --git
a/scene.c
b/scene.c
index
e08b667
..
e5d2a17
100644
(file)
--- a/
scene.c
+++ b/
scene.c
@@
-489,10
+489,12
@@
void makeMenu() {
* @param h New height
\r
*/
\r
void windowReshape(int w, int h) {
\r
- zoomFactor = zoomFactor - 1;
\r
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
\r
glMatrixMode(GL_PROJECTION);
\r
glLoadIdentity();
\r
+ GLfloat x = 2.0f*(200 + 0.5)/w-1.0;
\r
+ GLfloat y = 2.0f*(200 + 0.5)/h-1.0;
\r
+ glTranslatef(-x,-y,0.0f);
\r
if (w <= h)
\r
glOrtho(zoomFactor*near, zoomFactor*far, zoomFactor*near*(GLfloat)h/(GLfloat)w,
\r
zoomFactor*far*(GLfloat)h/(GLfloat)w, near, far);
\r
UCC
git Repository :: git.ucc.asn.au