From fe5d67d95f3a5fc84c5421d409a6464642aaf2cb Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 27 Oct 2000 16:44:40 +0000 Subject: Implement EXT_fog_coord and EXT_secondary_color. EXT_secondary_color is disabled until we get some dispatch offsets from SGI. --- src/mesa/main/context.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 8a5bf559e8..43165b364d 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.95 2000/10/23 00:16:28 gareth Exp $ */ +/* $Id: context.c,v 1.96 2000/10/27 16:44:40 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -698,6 +698,22 @@ init_fallback_arrays( GLcontext *ctx ) cl->Ptr = (void *) ctx->Current.ByteColor; cl->Enabled = 1; + cl = &ctx->Fallback.SecondaryColor; + cl->Size = 3; + cl->Type = GL_UNSIGNED_BYTE; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (void *) ctx->Current.SecondaryColor; + cl->Enabled = 1; + + cl = &ctx->Fallback.FogCoord; + cl->Size = 1; + cl->Type = GL_FLOAT; + cl->Stride = 0; + cl->StrideB = 0; + cl->Ptr = (void *) &ctx->Current.FogCoord; + cl->Enabled = 1; + cl = &ctx->Fallback.Index; cl->Size = 1; cl->Type = GL_UNSIGNED_INT; @@ -887,6 +903,8 @@ init_attrib_groups( GLcontext *ctx ) ctx->Current.Flag = (VERT_NORM | VERT_INDEX | VERT_RGBA | + VERT_SPEC_RGB | + VERT_FOG_COORD | VERT_EDGE | VERT_TEX0_1 | VERT_TEX1_1 | @@ -969,6 +987,8 @@ init_attrib_groups( GLcontext *ctx ) ctx->Fog.Density = 1.0; ctx->Fog.Start = 0.0; ctx->Fog.End = 1.0; + ctx->Fog.ColorSumEnabled = GL_FALSE; + ctx->Fog.FogCoordinateSource = GL_FRAGMENT_DEPTH_EXT; /* Hint group */ ctx->Hint.PerspectiveCorrection = GL_DONT_CARE; -- cgit v1.2.3