diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-10-09 22:42:40 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-10-09 22:42:40 +0000 |
commit | 35324a6c60cedf217934db1a7a0c11a7f553d2d4 (patch) | |
tree | 6c7cc9d52f6a79b2bd2e9616d127b9a76b1512a0 /src/mesa/main/context.c | |
parent | 1791901468a4eea3cc1a9c9f3a6c4913ff8a35eb (diff) |
if depthBits == 0, set DepthMask = 2^16 to fix per-fragment fog problems
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 018e709d90..34180a78c2 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.91 2000/09/28 22:44:30 brianp Exp $ */ +/* $Id: context.c,v 1.92 2000/10/09 22:42:40 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -277,10 +277,11 @@ _mesa_initialize_visual( GLvisual *vis, if (depthBits == 0) { /* Special case. Even if we don't have a depth buffer we need - * good values for DepthMax for Z vertex transformation purposes. + * good values for DepthMax for Z vertex transformation purposes + * and for per-fragment fog computation. */ - vis->DepthMax = 1; - vis->DepthMaxF = 1.0F; + vis->DepthMax = 1 << 16; + vis->DepthMaxF = (GLfloat) vis->DepthMax; } else if (depthBits < 32) { vis->DepthMax = (1 << depthBits) - 1; |