added GL_SGIX/SGIS_pixel_texture
[mesa.git] / src / mesa / main / state.c
index e092f81b61607d028ec97212ce3338efc5b348aa..990cd4d31c40b53010f689c5a1dd27afcb1fd4ad 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: state.c,v 1.3 2000/02/11 21:14:29 brianp Exp $ */
+/* $Id: state.c,v 1.7 2000/04/07 16:27:26 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -64,6 +64,7 @@
 #include "mmath.h"
 #include "pipeline.h"
 #include "pixel.h"
+#include "pixeltex.h"
 #include "points.h"
 #include "polygon.h"
 #include "quads.h"
@@ -88,8 +89,6 @@
 
 
 
-
-
 static int
 generic_noop(void)
 {
@@ -511,17 +510,32 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    exec->ResetMinmax = _mesa_ResetMinmax;
    exec->SeparableFilter2D = _mesa_SeparableFilter2D;
 
-   /* 6. GL_EXT_texture3d */
+   /* GL_EXT_texture3d */
+#if 0
    exec->CopyTexSubImage3DEXT = _mesa_CopyTexSubImage3D;
    exec->TexImage3DEXT = _mesa_TexImage3DEXT;
    exec->TexSubImage3DEXT = _mesa_TexSubImage3D;
+#endif
 
    /* GL_EXT_paletted_texture */
+#if 0
    exec->ColorTableEXT = _mesa_ColorTableEXT;
    exec->ColorSubTableEXT = _mesa_ColorSubTableEXT;
-   exec->GetColorTableEXT = _mesa_GetColorTableEXT;
-   exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfvEXT;
-   exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameterivEXT;
+#endif
+   exec->GetColorTableEXT = _mesa_GetColorTable;
+   exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
+   exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
+
+   /* GL_SGIX_pixel_texture */
+   exec->PixelTexGenSGIX = _mesa_PixelTexGenSGIX;
+
+   /* GL_SGIS_pixel_texture */
+   exec->PixelTexGenParameteriSGIS = _mesa_PixelTexGenParameteriSGIS;
+   exec->PixelTexGenParameterivSGIS = _mesa_PixelTexGenParameterivSGIS;
+   exec->PixelTexGenParameterfSGIS = _mesa_PixelTexGenParameterfSGIS;
+   exec->PixelTexGenParameterfvSGIS = _mesa_PixelTexGenParameterfvSGIS;
+   exec->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS;
+   exec->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS;
 
    /* GL_EXT_compiled_vertex_array */
    exec->LockArraysEXT = _mesa_LockArraysEXT;
@@ -531,17 +545,21 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    exec->PointParameterfEXT = _mesa_PointParameterfEXT;
    exec->PointParameterfvEXT = _mesa_PointParameterfvEXT;
 
-   /* 77. GL_PGI_misc_hints */
+   /* GL_PGI_misc_hints */
    exec->HintPGI = _mesa_HintPGI;
 
    /* GL_EXT_polygon_offset */
    exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT;
 
    /* GL_EXT_blend_minmax */
+#if 0
    exec->BlendEquationEXT = _mesa_BlendEquationEXT;
+#endif
 
    /* GL_EXT_blend_color */
+#if 0
    exec->BlendColorEXT = _mesa_BlendColorEXT;
+#endif
 
    /* GL_ARB_multitexture */
    exec->ActiveTextureARB = _mesa_ActiveTextureARB;
@@ -580,7 +598,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    exec->MultiTexCoord4svARB = _mesa_MultiTexCoord4svARB;
 
    /* GL_INGR_blend_func_separate */
-   exec->BlendFuncSeparateINGR = _mesa_BlendFuncSeparateINGR;
+   exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT;
 
    /* GL_MESA_window_pos */
    exec->WindowPos2dMESA = _mesa_WindowPos2dMESA;
@@ -785,11 +803,14 @@ static void update_rasterflags( GLcontext *ctx )
       ctx->RasterMask |= WINCLIP_BIT;
    }
 
+   if (ctx->Depth.OcclusionTest)
+      ctx->RasterMask |= OCCLUSION_BIT;
+
+
    /* If we're not drawing to exactly one color buffer set the
     * MULTI_DRAW_BIT flag.  Also set it if we're drawing to no
     * buffers or the RGBA or CI mask disables all writes.
     */
-
    ctx->TriangleCaps &= ~DD_MULTIDRAW;
 
    if (ctx->Color.MultiDrawBuffer) {