diff options
author | Brian Paul <[email protected]> | 2000-03-18 01:13:29 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-03-18 01:13:29 +0000 |
commit | 586b4f66a88cb64119c57396cdb804b96f12043a (patch) | |
tree | 1adc14986e2c6125b7d80fc3922cf20d2b2fa0d6 /progs/demos/gamma.c | |
parent | e7b16b74bf5d13331b5a88bbbbb9096560297b63 (diff) |
colors were computed incorrectly (Hans Nelles)
Diffstat (limited to 'progs/demos/gamma.c')
-rw-r--r-- | progs/demos/gamma.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/progs/demos/gamma.c b/progs/demos/gamma.c index a3b0bd8c67b..1b002ed7e80 100644 --- a/progs/demos/gamma.c +++ b/progs/demos/gamma.c @@ -1,5 +1,5 @@ -/* $Id: gamma.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */ +/* $Id: gamma.c,v 1.2 2000/03/18 01:13:29 brianp Exp $ */ /* Draw test patterns to help determine correct gamma value for a display. When the intensities of the inner squares nearly match the intensities @@ -25,8 +25,11 @@ /* * $Log: gamma.c,v $ - * Revision 1.1 1999/08/19 00:55:40 jtg - * Initial revision + * Revision 1.2 2000/03/18 01:13:29 brianp + * colors were computed incorrectly (Hans Nelles) + * + * Revision 1.1.1.1 1999/08/19 00:55:40 jtg + * Imported sources * * Revision 3.1 1999/06/19 01:35:38 brianp * merged in Kai Schuetz's RGB changes @@ -130,8 +133,9 @@ gamma_ramp(GLfloat yoffs, GLfloat r, GLfloat g, GLfloat b) for(d = 1; d < 4; d++) { /* increasing density from 25% to 75% */ GLfloat xcoord = (-1.0 + d*0.4); + GLfloat t = d * 0.25; - glColor3f(r*d / 5.0, g*d / 5.0, b*d / 5.0); /* draw outer rect */ + glColor3f(r*t, g*t, b*t); /* draw outer rect */ glRectf(xcoord, yoffs, xcoord+0.4, yoffs + 0.5); glColor3f(0.0, 0.0, 0.0); /* "clear" inner rect */ |