X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=progs%2Fdemos%2Fgamma.c;h=9b2c3e1052b148abd2a88455e6368016eeaffc75;hb=6ef27b88e6f767cd476676b33cb7c4ea6922234e;hp=a3b0bd8c67bc8e9462d98a9365958d141ea951a2;hpb=afb833d4e89c312460a4ab9ed6a7a8ca4ebbfe1c;p=mesa.git diff --git a/progs/demos/gamma.c b/progs/demos/gamma.c index a3b0bd8c67b..9b2c3e1052b 100644 --- a/progs/demos/gamma.c +++ b/progs/demos/gamma.c @@ -1,6 +1,4 @@ -/* $Id: gamma.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */ - /* Draw test patterns to help determine correct gamma value for a display. When the intensities of the inner squares nearly match the intensities of their frames (from some distance the borders should disappear) then @@ -23,19 +21,6 @@ /* Conversion to GLUT by Mark J. Kilgard */ -/* - * $Log: gamma.c,v $ - * Revision 1.1 1999/08/19 00:55:40 jtg - * Initial revision - * - * Revision 3.1 1999/06/19 01:35:38 brianp - * merged in Kai Schuetz's RGB changes - * - * Revision 3.0 1998/02/14 18:42:29 brianp - * initial rev - * - */ - #include #include @@ -130,8 +115,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 */