diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-10-09 22:44:01 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-10-09 22:44:01 +0000 |
commit | 18ef8e7c9850a0070a1da4805b7f23797366d6e0 (patch) | |
tree | 9ecf500193293ed1f15c09763a6ca718290303c4 | |
parent | b34a9dab57896266e89a355d25b52b8aae874098 (diff) |
if depthBits == 0, set DepthMask = 2^16 to fix per-fragment fog problems
-rw-r--r-- | src/mesa/main/context.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 8efef71934a..4d4a5974cd0 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -210,10 +210,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; |