From 2c161cf395b84576427d7dad53aea99072f325a3 Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Mon, 7 Jun 2004 06:03:08 +0000 Subject: [PATCH] small corrections --- progs/demos/fogcoord.c | 23 +++++++++++------------ src/mesa/main/matrix.c | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/progs/demos/fogcoord.c b/progs/demos/fogcoord.c index e44d1178c0c..71199443e96 100644 --- a/progs/demos/fogcoord.c +++ b/progs/demos/fogcoord.c @@ -22,7 +22,6 @@ #define VERBOSE 1 /* tell me what happens */ #define DEPTH 15.0f -#define EPS 1e-6f typedef void (GLAPIENTRYP GLFOGCOORDFEXTPROC) (GLfloat f); typedef void (GLAPIENTRYP GLFOGCOORDPOINTEREXTPROC) (GLenum, GLsizei, const GLvoid *); @@ -37,7 +36,7 @@ static GLuint texture[1]; static GLint fogMode; static GLboolean fogCoord; static GLfloat fogDensity = 0.75; -static GLfloat fogStart = 0.0, fogEnd = 1.0; +static GLfloat fogStart = 1.0, fogEnd = 40.0; static GLfloat fogColor[4] = {0.6f, 0.3f, 0.0f, 1.0f}; @@ -292,38 +291,38 @@ static void Key( unsigned char key, int x, int y ) fogMode = SetFogMode(fogMode + 1); break; case '+': - if (fogDensity < 1.0 - EPS) { + if (fogDensity < 1.0) { fogDensity += 0.05; } SetFogMode(fogMode); break; case '-': - if (fogDensity > EPS) { + if (fogDensity > 0.0) { fogDensity -= 0.05; } SetFogMode(fogMode); break; case 's': - if (fogStart > EPS) { - fogStart -= 0.1; + if (fogStart > 0.0) { + fogStart -= 1.0; } SetFogMode(fogMode); break; case 'S': - if (fogStart < fogEnd - EPS) { - fogStart += 0.1; + if (fogStart < fogEnd) { + fogStart += 1.0; } SetFogMode(fogMode); break; case 'e': - if (fogEnd > fogStart + EPS) { - fogEnd -= 0.1; + if (fogEnd > fogStart) { + fogEnd -= 1.0; } SetFogMode(fogMode); break; case 'E': - if (fogEnd < 1.0 - EPS) { - fogEnd += 0.1; + if (fogEnd < 100.0) { + fogEnd += 1.0; } SetFogMode(fogMode); break; diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 1e6b9dd3947..3a4bfe30967 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -112,7 +112,7 @@ _mesa_Ortho( GLdouble left, GLdouble right, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glFrustum(%f, %f, %f, %f, %f, %f)\n", + _mesa_debug(ctx, "glOrtho(%f, %f, %f, %f, %f, %f)\n", left, right, bottom, top, nearval, farval); if (left == right || -- 2.30.2