projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2078e6c
)
demos: fix aspect ratio in Reshape()
author
Brian Paul
<brianp@vmware.com>
Thu, 9 Apr 2009 23:04:58 +0000
(17:04 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 9 Apr 2009 23:04:58 +0000
(17:04 -0600)
progs/glsl/bump.c
patch
|
blob
|
history
diff --git
a/progs/glsl/bump.c
b/progs/glsl/bump.c
index b93ab44b5b9000bb91b60a33771ea80ac9ff9438..0ea1f8331ff3cbcc82e1529f041b5b27a22981f5 100644
(file)
--- a/
progs/glsl/bump.c
+++ b/
progs/glsl/bump.c
@@
-150,10
+150,11
@@
Redisplay(void)
static void
Reshape(int width, int height)
{
+ float ar = (float) width / (float) height;
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- glFrustum(-
1.0, 1.0
, -1.0, 1.0, 5.0, 25.0);
+ glFrustum(-
ar, ar
, -1.0, 1.0, 5.0, 25.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -15.0f);