new texture compression infrastructure
[mesa.git] / src / mesa / main / context.c
index 9a141d9db207615820d9b7ec73d2790939189d46..986dbc5aca9912bcaad93032f09f2e15de6f6656 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.174 2002/06/29 19:48:15 brianp Exp $ */
+/* $Id: context.c,v 1.177 2002/09/27 02:45:37 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -930,7 +930,6 @@ init_attrib_groups( GLcontext *ctx )
    ctx->Const.MaxColorTableSize = MAX_COLOR_TABLE_SIZE;
    ctx->Const.MaxConvolutionWidth = MAX_CONVOLUTION_WIDTH;
    ctx->Const.MaxConvolutionHeight = MAX_CONVOLUTION_HEIGHT;
-   ctx->Const.NumCompressedTextureFormats = 0;
    ctx->Const.MaxClipPlanes = MAX_CLIP_PLANES;
    ctx->Const.MaxLights = MAX_LIGHTS;
 
@@ -978,7 +977,6 @@ init_attrib_groups( GLcontext *ctx )
    ctx->Color.ColorLogicOpEnabled = GL_FALSE;
    ctx->Color.LogicOp = GL_COPY;
    ctx->Color.DitherFlag = GL_TRUE;
-   ctx->Color.MultiDrawBuffer = GL_FALSE;
 
    /* Current group */
    ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_WEIGHT], 0.0, 0.0, 0.0, 0.0 );
@@ -1289,14 +1287,23 @@ init_attrib_groups( GLcontext *ctx )
 
    /* Stencil group */
    ctx->Stencil.Enabled = GL_FALSE;
-   ctx->Stencil.Function = GL_ALWAYS;
-   ctx->Stencil.FailFunc = GL_KEEP;
-   ctx->Stencil.ZPassFunc = GL_KEEP;
-   ctx->Stencil.ZFailFunc = GL_KEEP;
-   ctx->Stencil.Ref = 0;
-   ctx->Stencil.ValueMask = STENCIL_MAX;
+   ctx->Stencil.TestTwoSide = GL_FALSE;
+   ctx->Stencil.ActiveFace = 0;  /* 0 = GL_FRONT, 1 = GL_BACK */
+   ctx->Stencil.Function[0] = GL_ALWAYS;
+   ctx->Stencil.Function[1] = GL_ALWAYS;
+   ctx->Stencil.FailFunc[0] = GL_KEEP;
+   ctx->Stencil.FailFunc[1] = GL_KEEP;
+   ctx->Stencil.ZPassFunc[0] = GL_KEEP;
+   ctx->Stencil.ZPassFunc[1] = GL_KEEP;
+   ctx->Stencil.ZFailFunc[0] = GL_KEEP;
+   ctx->Stencil.ZFailFunc[1] = GL_KEEP;
+   ctx->Stencil.Ref[0] = 0;
+   ctx->Stencil.Ref[1] = 0;
+   ctx->Stencil.ValueMask[0] = STENCIL_MAX;
+   ctx->Stencil.ValueMask[1] = STENCIL_MAX;
+   ctx->Stencil.WriteMask[0] = STENCIL_MAX;
+   ctx->Stencil.WriteMask[1] = STENCIL_MAX;
    ctx->Stencil.Clear = 0;
-   ctx->Stencil.WriteMask = STENCIL_MAX;
 
    /* Texture group */
    ctx->Texture.CurrentUnit = 0;      /* multitexture */
@@ -1689,17 +1696,17 @@ _mesa_initialize_context( GLcontext *ctx,
 
    if (visual->doubleBufferMode) {
       ctx->Color.DrawBuffer = GL_BACK;
-      ctx->Color.DriverDrawBuffer = GL_BACK_LEFT;
-      ctx->Color.DrawDestMask = BACK_LEFT_BIT;
+      ctx->Color._DriverDrawBuffer = GL_BACK_LEFT;
+      ctx->Color._DrawDestMask = BACK_LEFT_BIT;
       ctx->Pixel.ReadBuffer = GL_BACK;
-      ctx->Pixel.DriverReadBuffer = GL_BACK_LEFT;
+      ctx->Pixel._DriverReadBuffer = GL_BACK_LEFT;
    }
    else {
       ctx->Color.DrawBuffer = GL_FRONT;
-      ctx->Color.DriverDrawBuffer = GL_FRONT_LEFT;
-      ctx->Color.DrawDestMask = FRONT_LEFT_BIT;
+      ctx->Color._DriverDrawBuffer = GL_FRONT_LEFT;
+      ctx->Color._DrawDestMask = FRONT_LEFT_BIT;
       ctx->Pixel.ReadBuffer = GL_FRONT;
-      ctx->Pixel.DriverReadBuffer = GL_FRONT_LEFT;
+      ctx->Pixel._DriverReadBuffer = GL_FRONT_LEFT;
    }
 
    if (!alloc_proxy_textures(ctx)) {
@@ -1716,6 +1723,8 @@ _mesa_initialize_context( GLcontext *ctx,
    _glapi_add_entrypoint("glCompressedTexSubImage2DARB", 558);
    _glapi_add_entrypoint("glCompressedTexSubImage1DARB", 559);
    _glapi_add_entrypoint("glGetCompressedTexImageARB", 560);
+   /* XXX we should add a bunch of new functions here */
+
 
    /* Find the larger of Mesa's dispatch table and libGL's dispatch table.
     * In practice, this'll be the same for stand-alone Mesa.  But for DRI