Consolidated source files. Since the re-org a number of source files
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 18 Jun 2001 17:26:08 +0000 (17:26 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 18 Jun 2001 17:26:08 +0000 (17:26 +0000)
only had one or two functions left in them.

18 files changed:
src/mesa/Makefile.X11
src/mesa/main/Makefile.OSMesa16
src/mesa/main/Makefile.X11
src/mesa/main/Makefile.win
src/mesa/main/attrib.c
src/mesa/main/blend.c
src/mesa/main/blend.h
src/mesa/main/buffers.c
src/mesa/main/buffers.h
src/mesa/main/descrip.mms
src/mesa/main/dlist.c
src/mesa/main/drawpix.c
src/mesa/main/drawpix.h
src/mesa/main/rastpos.c
src/mesa/main/rastpos.h
src/mesa/main/state.c
src/mesa/main/texstate.c
src/mesa/main/texstate.h

index 5f55bc6f8dc7dc5aab0f942d32dc9260c356bc05..3019df5c0a4b2f6665ba6fb70ccf4b242df1e4b1 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.X11,v 1.53 2001/06/01 22:22:41 keithw Exp $
+# $Id: Makefile.X11,v 1.54 2001/06/18 17:26:08 brianp Exp $
 
 # Mesa 3-D graphics library
 # Version:  3.5
@@ -22,38 +22,11 @@ LIBDIR = ../lib
 
 CORE_SOURCES = \
        api_arrayelt.c \
-       tnl/t_array_api.c \
-       tnl/t_array_import.c \
-       tnl/t_context.c \
-       tnl/t_eval_api.c \
-       tnl/t_imm_alloc.c \
-       tnl/t_imm_api.c \
-       tnl/t_imm_debug.c \
-       tnl/t_imm_dlist.c \
-       tnl/t_imm_elt.c \
-       tnl/t_imm_eval.c \
-       tnl/t_imm_exec.c \
-       tnl/t_imm_fixup.c \
-       tnl/t_pipeline.c \
-       tnl/t_vb_fog.c \
-       tnl/t_vb_light.c \
-       tnl/t_vb_normals.c \
-       tnl/t_vb_points.c \
-       tnl/t_vb_render.c \
-       tnl/t_vb_texgen.c \
-       tnl/t_vb_texmat.c \
-       tnl/t_vb_vertex.c \
-       swrast_setup/ss_context.c \
-       swrast_setup/ss_triangle.c \
-       swrast_setup/ss_vb.c \
-       swrast_setup/ss_interp.c \
        api_loopback.c \
        api_noop.c \
        api_validate.c \
        accum.c \
-       alpha.c \
        attrib.c \
-       bitmap.c \
        blend.c \
        buffers.c \
        clip.c \
@@ -61,7 +34,6 @@ CORE_SOURCES = \
        config.c \
        context.c \
        convolve.c \
-       copypix.c \
        debug.c \
        depth.c \
        dispatch.c \
@@ -83,18 +55,13 @@ CORE_SOURCES = \
        imports.c \
        light.c \
        lines.c \
-       logic.c \
-       masking.c \
        matrix.c \
        mem.c \
        mmath.c \
        pixel.c \
-       pixeltex.c \
        points.c \
        polygon.c \
        rastpos.c \
-       readpix.c \
-       scissor.c \
        state.c \
        stencil.c \
        texformat.c \
@@ -105,7 +72,6 @@ CORE_SOURCES = \
        texutil.c \
        varray.c \
        vtxfmt.c \
-       winpos.c \
        X86/x86.c \
        X86/common_x86.c \
        X86/3dnow.c \
@@ -151,7 +117,32 @@ CORE_SOURCES = \
        swrast/s_texture.c \
        swrast/s_texstore.c \
        swrast/s_triangle.c \
-       swrast/s_zoom.c
+       swrast/s_zoom.c \
+       swrast_setup/ss_context.c \
+       swrast_setup/ss_triangle.c \
+       swrast_setup/ss_vb.c \
+       swrast_setup/ss_interp.c \
+       tnl/t_array_api.c \
+       tnl/t_array_import.c \
+       tnl/t_context.c \
+       tnl/t_eval_api.c \
+       tnl/t_imm_alloc.c \
+       tnl/t_imm_api.c \
+       tnl/t_imm_debug.c \
+       tnl/t_imm_dlist.c \
+       tnl/t_imm_elt.c \
+       tnl/t_imm_eval.c \
+       tnl/t_imm_exec.c \
+       tnl/t_imm_fixup.c \
+       tnl/t_pipeline.c \
+       tnl/t_vb_fog.c \
+       tnl/t_vb_light.c \
+       tnl/t_vb_normals.c \
+       tnl/t_vb_points.c \
+       tnl/t_vb_render.c \
+       tnl/t_vb_texgen.c \
+       tnl/t_vb_texmat.c \
+       tnl/t_vb_vertex.c
 
 
 DRIVER_SOURCES = \
index f1a9300c4040fcd74b686857540d862aa188befe..b96ca802a60a068aa565477822d5ba82141464a3 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.OSMesa16,v 1.2 2001/05/29 22:06:13 brianp Exp $
+# $Id: Makefile.OSMesa16,v 1.3 2001/06/18 17:26:08 brianp Exp $
 
 # Mesa 3-D graphics library
 # Version:  3.5
@@ -22,38 +22,11 @@ LIBDIR = ../lib
 
 
 CORE_SOURCES = \
-       tnl/t_array_api.c \
-       tnl/t_array_import.c \
-       tnl/t_context.c \
-       tnl/t_eval_api.c \
-       tnl/t_imm_alloc.c \
-       tnl/t_imm_api.c \
-       tnl/t_imm_debug.c \
-       tnl/t_imm_dlist.c \
-       tnl/t_imm_elt.c \
-       tnl/t_imm_eval.c \
-       tnl/t_imm_exec.c \
-       tnl/t_imm_fixup.c \
-       tnl/t_pipeline.c \
-       tnl/t_vb_fog.c \
-       tnl/t_vb_light.c \
-       tnl/t_vb_normals.c \
-       tnl/t_vb_points.c \
-       tnl/t_vb_render.c \
-       tnl/t_vb_texgen.c \
-       tnl/t_vb_texmat.c \
-       tnl/t_vb_vertex.c \
-       swrast_setup/ss_context.c \
-       swrast_setup/ss_triangle.c \
-       swrast_setup/ss_vb.c \
-       swrast_setup/ss_interp.c \
        api_loopback.c \
        api_noop.c \
        api_validate.c \
        accum.c \
-       alpha.c \
        attrib.c \
-       bitmap.c \
        blend.c \
        buffers.c \
        clip.c \
@@ -61,7 +34,6 @@ CORE_SOURCES = \
        config.c \
        context.c \
        convolve.c \
-       copypix.c \
        debug.c \
        depth.c \
        dispatch.c \
@@ -83,18 +55,13 @@ CORE_SOURCES = \
        imports.c \
        light.c \
        lines.c \
-       logic.c \
-       masking.c \
        matrix.c \
        mem.c \
        mmath.c \
        pixel.c \
-       pixeltex.c \
        points.c \
        polygon.c \
        rastpos.c \
-       readpix.c \
-       scissor.c \
        state.c \
        stencil.c \
        texformat.c \
@@ -105,7 +72,6 @@ CORE_SOURCES = \
        texutil.c \
        varray.c \
        vtxfmt.c \
-       winpos.c \
        X86/x86.c \
        X86/common_x86.c \
        X86/3dnow.c \
@@ -152,6 +118,31 @@ CORE_SOURCES = \
        swrast/s_texstore.c \
        swrast/s_triangle.c \
        swrast/s_zoom.c \
+       swrast_setup/ss_context.c \
+       swrast_setup/ss_triangle.c \
+       swrast_setup/ss_vb.c \
+       swrast_setup/ss_interp.c \
+       tnl/t_array_api.c \
+       tnl/t_array_import.c \
+       tnl/t_context.c \
+       tnl/t_eval_api.c \
+       tnl/t_imm_alloc.c \
+       tnl/t_imm_api.c \
+       tnl/t_imm_debug.c \
+       tnl/t_imm_dlist.c \
+       tnl/t_imm_elt.c \
+       tnl/t_imm_eval.c \
+       tnl/t_imm_exec.c \
+       tnl/t_imm_fixup.c \
+       tnl/t_pipeline.c \
+       tnl/t_vb_fog.c \
+       tnl/t_vb_light.c \
+       tnl/t_vb_normals.c \
+       tnl/t_vb_points.c \
+       tnl/t_vb_render.c \
+       tnl/t_vb_texgen.c \
+       tnl/t_vb_texmat.c \
+       tnl/t_vb_vertex.c \
        OSmesa/osmesa.c
 
 ASM_SOURCES =
index 5f55bc6f8dc7dc5aab0f942d32dc9260c356bc05..3019df5c0a4b2f6665ba6fb70ccf4b242df1e4b1 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.X11,v 1.53 2001/06/01 22:22:41 keithw Exp $
+# $Id: Makefile.X11,v 1.54 2001/06/18 17:26:08 brianp Exp $
 
 # Mesa 3-D graphics library
 # Version:  3.5
@@ -22,38 +22,11 @@ LIBDIR = ../lib
 
 CORE_SOURCES = \
        api_arrayelt.c \
-       tnl/t_array_api.c \
-       tnl/t_array_import.c \
-       tnl/t_context.c \
-       tnl/t_eval_api.c \
-       tnl/t_imm_alloc.c \
-       tnl/t_imm_api.c \
-       tnl/t_imm_debug.c \
-       tnl/t_imm_dlist.c \
-       tnl/t_imm_elt.c \
-       tnl/t_imm_eval.c \
-       tnl/t_imm_exec.c \
-       tnl/t_imm_fixup.c \
-       tnl/t_pipeline.c \
-       tnl/t_vb_fog.c \
-       tnl/t_vb_light.c \
-       tnl/t_vb_normals.c \
-       tnl/t_vb_points.c \
-       tnl/t_vb_render.c \
-       tnl/t_vb_texgen.c \
-       tnl/t_vb_texmat.c \
-       tnl/t_vb_vertex.c \
-       swrast_setup/ss_context.c \
-       swrast_setup/ss_triangle.c \
-       swrast_setup/ss_vb.c \
-       swrast_setup/ss_interp.c \
        api_loopback.c \
        api_noop.c \
        api_validate.c \
        accum.c \
-       alpha.c \
        attrib.c \
-       bitmap.c \
        blend.c \
        buffers.c \
        clip.c \
@@ -61,7 +34,6 @@ CORE_SOURCES = \
        config.c \
        context.c \
        convolve.c \
-       copypix.c \
        debug.c \
        depth.c \
        dispatch.c \
@@ -83,18 +55,13 @@ CORE_SOURCES = \
        imports.c \
        light.c \
        lines.c \
-       logic.c \
-       masking.c \
        matrix.c \
        mem.c \
        mmath.c \
        pixel.c \
-       pixeltex.c \
        points.c \
        polygon.c \
        rastpos.c \
-       readpix.c \
-       scissor.c \
        state.c \
        stencil.c \
        texformat.c \
@@ -105,7 +72,6 @@ CORE_SOURCES = \
        texutil.c \
        varray.c \
        vtxfmt.c \
-       winpos.c \
        X86/x86.c \
        X86/common_x86.c \
        X86/3dnow.c \
@@ -151,7 +117,32 @@ CORE_SOURCES = \
        swrast/s_texture.c \
        swrast/s_texstore.c \
        swrast/s_triangle.c \
-       swrast/s_zoom.c
+       swrast/s_zoom.c \
+       swrast_setup/ss_context.c \
+       swrast_setup/ss_triangle.c \
+       swrast_setup/ss_vb.c \
+       swrast_setup/ss_interp.c \
+       tnl/t_array_api.c \
+       tnl/t_array_import.c \
+       tnl/t_context.c \
+       tnl/t_eval_api.c \
+       tnl/t_imm_alloc.c \
+       tnl/t_imm_api.c \
+       tnl/t_imm_debug.c \
+       tnl/t_imm_dlist.c \
+       tnl/t_imm_elt.c \
+       tnl/t_imm_eval.c \
+       tnl/t_imm_exec.c \
+       tnl/t_imm_fixup.c \
+       tnl/t_pipeline.c \
+       tnl/t_vb_fog.c \
+       tnl/t_vb_light.c \
+       tnl/t_vb_normals.c \
+       tnl/t_vb_points.c \
+       tnl/t_vb_render.c \
+       tnl/t_vb_texgen.c \
+       tnl/t_vb_texmat.c \
+       tnl/t_vb_vertex.c
 
 
 DRIVER_SOURCES = \
index 3b3710a6c29b41eb0ba8b5575fbbba14b3e43f92..080a722da8825c9302881968a0629c0aa932d41e 100644 (file)
@@ -34,9 +34,7 @@ CORE_SRCS = \
        api_noop.c \
        api_validate.c \
        accum.c \
-       alpha.c \
        attrib.c \
-       bitmap.c \
        blend.c \
        buffers.c \
        clip.c \
@@ -44,7 +42,6 @@ CORE_SRCS = \
        config.c \
        context.c \
        convolve.c \
-       copypix.c \
        debug.c \
        depth.c \
        dispatch.c \
@@ -67,19 +64,14 @@ CORE_SRCS = \
        imports.c \
        light.c \
        lines.c \
-       logic.c \
        lowpc.c \
-       masking.c \
        matrix.c \
        mem.c \
        mmath.c \
        pixel.c \
-       pixeltex.c \
        points.c \
        polygon.c \
        rastpos.c \
-       readpix.c \
-       scissor.c \
        state.c \
        stencil.c \
        teximage.c \
@@ -89,7 +81,6 @@ CORE_SRCS = \
        texutil.c \
        varray.c \
        vtxfmt.c \
-       winpos.c \
        X86\x86.c \
        X86\common_x86.c \
        X86\3dnow.c \
index 145ff9e93888aa5c301050d02eb7ee60adb4daa9..22dad13e920962365e93720f32ce7bdbc3953efb 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.51 2001/05/29 15:23:48 brianp Exp $ */
+/* $Id: attrib.c,v 1.52 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -30,7 +30,6 @@
 #else
 #include "glheader.h"
 #include "accum.h"
-#include "alpha.h"
 #include "attrib.h"
 #include "blend.h"
 #include "buffers.h"
 #include "hint.h"
 #include "light.h"
 #include "lines.h"
-#include "logic.h"
-#include "masking.h"
 #include "matrix.h"
 #include "mem.h"
 #include "points.h"
 #include "polygon.h"
-#include "scissor.h"
 #include "simple_list.h"
 #include "stencil.h"
 #include "texstate.h"
index 382c27d710b43397d8f40578facb30d2d7c95bf0..d99d07874842c49334ad1999c7dc9d574a57a291 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: blend.c,v 1.32 2001/03/29 16:50:31 brianp Exp $ */
+/* $Id: blend.c,v 1.33 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -30,6 +30,7 @@
 #else
 #include "glheader.h"
 #include "blend.h"
+#include "colormac.h"
 #include "context.h"
 #include "enums.h"
 #include "macros.h"
@@ -339,3 +340,127 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
    if (ctx->Driver.BlendColor)
       (*ctx->Driver.BlendColor)(ctx, tmp);
 }
+
+
+void
+_mesa_AlphaFunc( GLenum func, GLclampf ref )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLchan cref;
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   switch (func) {
+   case GL_NEVER:
+   case GL_LESS:
+   case GL_EQUAL:
+   case GL_LEQUAL:
+   case GL_GREATER:
+   case GL_NOTEQUAL:
+   case GL_GEQUAL:
+   case GL_ALWAYS:
+      /* convert float alpha ref to GLchan type */
+      UNCLAMPED_FLOAT_TO_CHAN(cref, ref);
+
+      if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRef == cref)
+         return;
+
+      FLUSH_VERTICES(ctx, _NEW_COLOR);
+      ctx->Color.AlphaFunc = func;
+      ctx->Color.AlphaRef = cref;
+
+      if (ctx->Driver.AlphaFunc)
+         ctx->Driver.AlphaFunc(ctx, func, cref);
+      return;
+
+   default:
+      _mesa_error( ctx, GL_INVALID_ENUM, "glAlphaFunc(func)" );
+      return;
+   }
+}
+
+
+void
+_mesa_LogicOp( GLenum opcode )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   switch (opcode) {
+      case GL_CLEAR:
+      case GL_SET:
+      case GL_COPY:
+      case GL_COPY_INVERTED:
+      case GL_NOOP:
+      case GL_INVERT:
+      case GL_AND:
+      case GL_NAND:
+      case GL_OR:
+      case GL_NOR:
+      case GL_XOR:
+      case GL_EQUIV:
+      case GL_AND_REVERSE:
+      case GL_AND_INVERTED:
+      case GL_OR_REVERSE:
+      case GL_OR_INVERTED:
+        break;
+      default:
+         _mesa_error( ctx, GL_INVALID_ENUM, "glLogicOp" );
+        return;
+   }
+
+   if (ctx->Color.LogicOp == opcode)
+      return;
+
+   FLUSH_VERTICES(ctx, _NEW_COLOR);
+   ctx->Color.LogicOp = opcode;
+
+   if (ctx->Driver.LogicOpcode)
+      ctx->Driver.LogicOpcode( ctx, opcode );
+}
+
+
+void
+_mesa_IndexMask( GLuint mask )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (ctx->Color.IndexMask == mask)
+      return;
+
+   FLUSH_VERTICES(ctx, _NEW_COLOR);
+   ctx->Color.IndexMask = mask;
+
+   if (ctx->Driver.IndexMask)
+      ctx->Driver.IndexMask( ctx, mask );
+}
+
+
+void
+_mesa_ColorMask( GLboolean red, GLboolean green,
+                 GLboolean blue, GLboolean alpha )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLubyte tmp[4];
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (MESA_VERBOSE & VERBOSE_API)
+      fprintf(stderr, "glColorMask %d %d %d %d\n", red, green, blue, alpha);
+
+   /* Shouldn't have any information about channel depth in core mesa
+    * -- should probably store these as the native booleans:
+    */
+   tmp[RCOMP] = red    ? 0xff : 0x0;
+   tmp[GCOMP] = green  ? 0xff : 0x0;
+   tmp[BCOMP] = blue   ? 0xff : 0x0;
+   tmp[ACOMP] = alpha  ? 0xff : 0x0;
+
+   if (TEST_EQ_4UBV(tmp, ctx->Color.ColorMask))
+      return;
+
+   FLUSH_VERTICES(ctx, _NEW_COLOR);
+   COPY_4UBV(ctx->Color.ColorMask, tmp);
+
+   if (ctx->Driver.ColorMask)
+      ctx->Driver.ColorMask( ctx, red, green, blue, alpha );
+}
index c2ec7093e2879b85afec732fac093260f1f5429e..3e8b4ec1b57700e720899df11dce9a2a96baf08a 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: blend.h,v 1.8 2001/03/12 00:48:37 gareth Exp $ */
+/* $Id: blend.h,v 1.9 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -31,6 +31,7 @@
 
 #include "mtypes.h"
 
+
 extern void
 _mesa_BlendFunc( GLenum sfactor, GLenum dfactor );
 
@@ -48,4 +49,20 @@ extern void
 _mesa_BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
 
 
+extern void
+_mesa_AlphaFunc( GLenum func, GLclampf ref );
+
+
+extern void
+_mesa_LogicOp( GLenum opcode );
+
+
+extern void
+_mesa_IndexMask( GLuint mask );
+
+extern void
+_mesa_ColorMask( GLboolean red, GLboolean green,
+                 GLboolean blue, GLboolean alpha );
+
+
 #endif
index 82afb401a82b1cae77a9bf0fac57e9147681a7ed..075cc66adf2c7161fca0312f791aa8b74072cc93 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: buffers.c,v 1.29 2001/05/29 15:23:48 brianp Exp $ */
+/* $Id: buffers.c,v 1.30 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -36,7 +36,6 @@
 #include "depth.h"
 #include "enums.h"
 #include "macros.h"
-#include "masking.h"
 #include "mem.h"
 #include "stencil.h"
 #include "state.h"
@@ -372,6 +371,37 @@ _mesa_ResizeBuffersMESA( void )
 }
 
 
+void
+_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (width < 0 || height < 0) {
+      _mesa_error( ctx, GL_INVALID_VALUE, "glScissor" );
+      return;
+   }
+
+   if (MESA_VERBOSE & VERBOSE_API)
+      fprintf(stderr, "glScissor %d %d %d %d\n", x, y, width, height);
+
+   if (x == ctx->Scissor.X &&
+       y == ctx->Scissor.Y &&
+       width == ctx->Scissor.Width &&
+       height == ctx->Scissor.Height)
+      return;
+
+   FLUSH_VERTICES(ctx, _NEW_SCISSOR);
+   ctx->Scissor.X = x;
+   ctx->Scissor.Y = y;
+   ctx->Scissor.Width = width;
+   ctx->Scissor.Height = height;
+
+   if (ctx->Driver.Scissor)
+      ctx->Driver.Scissor( ctx, x, y, width, height );
+}
+
+
 /*
  * XXX move somewhere else someday?
  */
index ca0cdafd05e7375c56025d6ea295c744e8318961..67c1fae806960655c8431e2c755b7b2b9a302299 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: buffers.h,v 1.4 2001/05/29 15:23:48 brianp Exp $ */
+/* $Id: buffers.h,v 1.5 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -51,6 +51,9 @@ _mesa_ReadBuffer( GLenum mode );
 extern void
 _mesa_ResizeBuffersMESA( void );
 
+extern void
+_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height );
+
 extern void
 _mesa_SampleCoverageARB(GLclampf value, GLboolean invert);
 
index c9f7fe0d18a8e535fc2781e7603ac9a1ad44667f..b48bb0f62061d41db3c8030b9063e16e8977406b 100644 (file)
@@ -16,12 +16,10 @@ LIBDIR = [-.lib]
 CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)
 
 CORE_SOURCES =accum.c \
-       alpha.c \
        api_loopback.c \
        api_noop.c \
        api_validate.c \
        attrib.c \
-       bitmap.c \
        blend.c \
        buffers.c \
        clip.c \
@@ -29,7 +27,6 @@ CORE_SOURCES =accum.c \
        config.c \
        context.c \
        convolve.c \
-       copypix.c \
        debug.c \
        depth.c \
        dispatch.c \
@@ -52,19 +49,14 @@ CORE_SOURCES =accum.c \
        imports.c \
        light.c \
        lines.c \
-       logic.c \
        lowpc.c \
-       masking.c \
        matrix.c \
        mem.c \
        mmath.c \
        pixel.c \
-       pixeltex.c \
        points.c \
        polygon.c \
        rastpos.c \
-       readpix.c \
-       scissor.c \
        state.c \
        stencil.c \
        texformat.c \
@@ -75,7 +67,6 @@ CORE_SOURCES =accum.c \
        texutil.c \
        varray.c \
        vtxfmt.c \
-       winpos.c \
        [.x86]x86.c
 
 DRIVER_SOURCES = [.x]glxapi.c [.x]fakeglx.c [.x]xfonts.c \
index bf88cb1a5e886d04cdd87592c9eb3552a1050b53..e942676dcafbdfa63819e2c15778a39d71b05e55 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: dlist.c,v 1.74 2001/06/12 22:06:10 brianp Exp $ */
+/* $Id: dlist.c,v 1.75 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
 #include "all.h"
 #else
 #include "glheader.h"
-#include "accum.h"
 #include "api_loopback.h"
 #include "attrib.h"
-#include "bitmap.h"
 #include "blend.h"
 #include "buffers.h"
 #include "clip.h"
@@ -40,7 +38,6 @@
 #include "colortab.h"
 #include "context.h"
 #include "convolve.h"
-#include "copypix.h"
 #include "depth.h"
 #include "dlist.h"
 #include "enable.h"
 #include "matrix.h"
 #include "mem.h"
 #include "pixel.h"
-#include "pixeltex.h"
 #include "points.h"
 #include "polygon.h"
-#include "readpix.h"
 #include "state.h"
 #include "texobj.h"
 #include "teximage.h"
index e51f8369a1ef97e53e4caa992a609d031eed2d05..963eb06b44d261f1232151cb7140805947f5e5df 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.53 2001/04/28 08:39:17 keithw Exp $ */
+/* $Id: drawpix.c,v 1.54 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -95,3 +95,134 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
       }
    }
 }
+
+
+
+void
+_mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
+                 GLenum format, GLenum type, GLvoid *pixels )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+   if (!pixels) {
+      _mesa_error( ctx, GL_INVALID_VALUE, "glReadPixels(pixels)" );
+      return;
+   }
+
+   if (ctx->NewState)
+      _mesa_update_state(ctx);
+
+   ctx->Driver.ReadPixels(ctx, x, y, width, height,
+                         format, type, &ctx->Pack, pixels);
+
+}
+
+
+
+void
+_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
+                  GLenum type )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLint destx, desty;
+   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+   if (width < 0 || height < 0) {
+      _mesa_error( ctx, GL_INVALID_VALUE, "glCopyPixels" );
+      return;
+   }
+
+   if (ctx->NewState) {
+      _mesa_update_state(ctx);
+   }
+
+   if (ctx->RenderMode==GL_RENDER) {
+      /* Destination of copy: */
+      if (!ctx->Current.RasterPosValid) {
+        return;
+      }
+      destx = IROUND(ctx->Current.RasterPos[0]);
+      desty = IROUND(ctx->Current.RasterPos[1]);
+
+      ctx->OcclusionResult = GL_TRUE;
+
+      ctx->Driver.CopyPixels( ctx, srcx, srcy, width, height, destx, desty,
+                             type );
+   }
+   else if (ctx->RenderMode == GL_FEEDBACK) {
+      FLUSH_CURRENT( ctx, 0 );
+      FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_COPY_PIXEL_TOKEN );
+      _mesa_feedback_vertex( ctx, 
+                            ctx->Current.RasterPos,
+                            ctx->Current.Color, 
+                            ctx->Current.Index,
+                            ctx->Current.Texcoord[0] );
+   }
+   else if (ctx->RenderMode == GL_SELECT) {
+      _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] );
+   }
+}
+
+
+
+void
+_mesa_Bitmap( GLsizei width, GLsizei height,
+              GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,
+              const GLubyte *bitmap )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+
+   /* Error checking */
+   if (width < 0 || height < 0) {
+      _mesa_error( ctx, GL_INVALID_VALUE, "glBitmap" );
+      return;
+   }
+
+   if (ctx->Current.RasterPosValid == GL_FALSE) {
+      return;    /* do nothing */
+   }
+
+   if (ctx->RenderMode==GL_RENDER) {
+      if (bitmap) {
+         GLint x = (GLint) ( (ctx->Current.RasterPos[0] - xorig) + 0.0F );
+         GLint y = (GLint) ( (ctx->Current.RasterPos[1] - yorig) + 0.0F );
+
+         if (ctx->NewState) {
+            _mesa_update_state(ctx);
+         }
+
+         ctx->OcclusionResult = GL_TRUE;
+        ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap );
+      }
+   }
+   else if (ctx->RenderMode==GL_FEEDBACK) {
+      GLfloat color[4], texcoord[4], invq;
+
+      color[0] = ctx->Current.RasterColor[0];
+      color[1] = ctx->Current.RasterColor[1];
+      color[2] = ctx->Current.RasterColor[2];
+      color[3] = ctx->Current.RasterColor[3];
+      if (ctx->Current.Texcoord[0][3] == 0.0)
+         invq = 1.0F;
+      else
+         invq = 1.0F / ctx->Current.RasterTexCoord[3];
+      texcoord[0] = ctx->Current.RasterTexCoord[0] * invq;
+      texcoord[1] = ctx->Current.RasterTexCoord[1] * invq;
+      texcoord[2] = ctx->Current.RasterTexCoord[2] * invq;
+      texcoord[3] = ctx->Current.RasterTexCoord[3];
+      FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_BITMAP_TOKEN );
+      _mesa_feedback_vertex( ctx,
+                          ctx->Current.RasterPos,
+                         color, ctx->Current.RasterIndex, texcoord );
+   }
+   else if (ctx->RenderMode==GL_SELECT) {
+      /* Bitmaps don't generate selection hits.  See appendix B of 1.1 spec. */
+   }
+
+   /* update raster position */
+   ctx->Current.RasterPos[0] += xmove;
+   ctx->Current.RasterPos[1] += ymove;
+}
index c199877e4ac8efe4857c726ed43eb33a1dfe295f..aa321faec1789c4b1caf66ec8837a698994132a2 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: drawpix.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
+/* $Id: drawpix.h,v 1.7 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
 
 #include "mtypes.h"
 
+
 extern void
 _mesa_DrawPixels( GLsizei width, GLsizei height,
                   GLenum format, GLenum type, const GLvoid *pixels );
 
 
+extern void
+_mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
+                  GLenum format, GLenum type, GLvoid *pixels );
+
+
+extern void
+_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
+                  GLenum type );
+
+
+extern void
+_mesa_Bitmap( GLsizei width, GLsizei height,
+              GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,
+              const GLubyte *bitmap );
+
+
 #endif
index 958cf23bfb8858b8c8e6e37d47dae253806bf4e1..adc81ed478556ff6152cca1ce9909cbcbe6d4f83 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: rastpos.c,v 1.25 2001/05/30 15:22:04 brianp Exp $ */
+/* $Id: rastpos.c,v 1.26 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -482,3 +482,239 @@ _mesa_RasterPos4sv(const GLshort *v)
 {
    _mesa_RasterPos4f(v[0], v[1], v[2], v[3]);
 }
+
+
+
+/**********************************************************************/
+/***                     GL_MESA_window_pos                         ***/
+/**********************************************************************/
+
+
+/*
+ * This is a MESA extension function.  Pretty much just like glRasterPos
+ * except we don't apply the modelview or projection matrices; specify a
+ * window coordinate directly.
+ * Caller:  context->API.WindowPos4fMESA pointer.
+ */
+void
+_mesa_WindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+   FLUSH_CURRENT(ctx, 0);
+
+   /* set raster position */
+   ctx->Current.RasterPos[0] = x;
+   ctx->Current.RasterPos[1] = y;
+   ctx->Current.RasterPos[2] = CLAMP( z, 0.0F, 1.0F );
+   ctx->Current.RasterPos[3] = w;
+
+   ctx->Current.RasterPosValid = GL_TRUE;
+   ctx->Current.RasterDistance = 0.0F;
+   ctx->Current.RasterFogCoord = 0.0F;
+
+   /* raster color = current color or index */
+   if (ctx->Visual.rgbMode) {
+      ctx->Current.RasterColor[0] = (ctx->Current.Color[0]);
+      ctx->Current.RasterColor[1] = (ctx->Current.Color[1]);
+      ctx->Current.RasterColor[2] = (ctx->Current.Color[2]);
+      ctx->Current.RasterColor[3] = (ctx->Current.Color[3]);
+   }
+   else {
+      ctx->Current.RasterIndex = ctx->Current.Index;
+   }
+
+   /* raster texcoord = current texcoord */
+   {
+      GLuint texSet;
+      for (texSet = 0; texSet < ctx->Const.MaxTextureUnits; texSet++) {
+         COPY_4FV( ctx->Current.RasterMultiTexCoord[texSet],
+                  ctx->Current.Texcoord[texSet] );
+      }
+   }
+
+   if (ctx->RenderMode==GL_SELECT) {
+      _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] );
+   }
+}
+
+
+
+
+void
+_mesa_WindowPos2dMESA(GLdouble x, GLdouble y)
+{
+   _mesa_WindowPos4fMESA(x, y, 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos2fMESA(GLfloat x, GLfloat y)
+{
+   _mesa_WindowPos4fMESA(x, y, 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos2iMESA(GLint x, GLint y)
+{
+   _mesa_WindowPos4fMESA(x, y, 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos2sMESA(GLshort x, GLshort y)
+{
+   _mesa_WindowPos4fMESA(x, y, 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z)
+{
+   _mesa_WindowPos4fMESA(x, y, z, 1.0F);
+}
+
+void
+_mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
+{
+   _mesa_WindowPos4fMESA(x, y, z, 1.0F);
+}
+
+void
+_mesa_WindowPos3iMESA(GLint x, GLint y, GLint z)
+{
+   _mesa_WindowPos4fMESA(x, y, z, 1.0F);
+}
+
+void
+_mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z)
+{
+   _mesa_WindowPos4fMESA(x, y, z, 1.0F);
+}
+
+void
+_mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+{
+   _mesa_WindowPos4fMESA(x, y, z, w);
+}
+
+void
+_mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w)
+{
+   _mesa_WindowPos4fMESA(x, y, z, w);
+}
+
+void
+_mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w)
+{
+   _mesa_WindowPos4fMESA(x, y, z, w);
+}
+
+void
+_mesa_WindowPos2dvMESA(const GLdouble *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos2fvMESA(const GLfloat *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos2ivMESA(const GLint *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos2svMESA(const GLshort *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], 0.0F, 1.0F);
+}
+
+void
+_mesa_WindowPos3dvMESA(const GLdouble *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
+}
+
+void
+_mesa_WindowPos3fvMESA(const GLfloat *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
+}
+
+void
+_mesa_WindowPos3ivMESA(const GLint *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
+}
+
+void
+_mesa_WindowPos3svMESA(const GLshort *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], 1.0F);
+}
+
+void
+_mesa_WindowPos4dvMESA(const GLdouble *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
+}
+
+void
+_mesa_WindowPos4fvMESA(const GLfloat *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
+}
+
+void
+_mesa_WindowPos4ivMESA(const GLint *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
+}
+
+void
+_mesa_WindowPos4svMESA(const GLshort *v)
+{
+   _mesa_WindowPos4fMESA(v[0], v[1], v[2], v[3]);
+}
+
+
+
+#if 0
+
+/*
+ * OpenGL implementation of glWindowPos*MESA()
+ */
+void glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+{
+   GLfloat fx, fy;
+
+   /* Push current matrix mode and viewport attributes */
+   glPushAttrib( GL_TRANSFORM_BIT | GL_VIEWPORT_BIT );
+
+   /* Setup projection parameters */
+   glMatrixMode( GL_PROJECTION );
+   glPushMatrix();
+   glLoadIdentity();
+   glMatrixMode( GL_MODELVIEW );
+   glPushMatrix();
+   glLoadIdentity();
+
+   glDepthRange( z, z );
+   glViewport( (int) x - 1, (int) y - 1, 2, 2 );
+
+   /* set the raster (window) position */
+   fx = x - (int) x;
+   fy = y - (int) y;
+   glRasterPos4f( fx, fy, 0.0, w );
+
+   /* restore matrices, viewport and matrix mode */
+   glPopMatrix();
+   glMatrixMode( GL_PROJECTION );
+   glPopMatrix();
+
+   glPopAttrib();
+}
+
+#endif
index 40ccc9760cd732e41297d5ca2215ebe2250cd5b2..234eb76ce1d96b1ede86a579fe00aa5bd7518487 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: rastpos.h,v 1.3 2001/03/12 00:48:38 gareth Exp $ */
+/* $Id: rastpos.h,v 1.4 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -105,4 +105,81 @@ extern void
 _mesa_RasterPos4sv(const GLshort *v);
 
 
+/**********************************************************************/
+/***                     GL_MESA_window_pos                         ***/
+/**********************************************************************/
+
+extern void
+_mesa_WindowPos2dMESA(GLdouble x, GLdouble y);
+
+extern void
+_mesa_WindowPos2fMESA(GLfloat x, GLfloat y);
+
+extern void
+_mesa_WindowPos2iMESA(GLint x, GLint y);
+
+extern void
+_mesa_WindowPos2sMESA(GLshort x, GLshort y);
+
+extern void
+_mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z);
+
+extern void
+_mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z);
+
+extern void
+_mesa_WindowPos3iMESA(GLint x, GLint y, GLint z);
+
+extern void
+_mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z);
+
+extern void
+_mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+
+extern void
+_mesa_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+
+extern void
+_mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w);
+
+extern void
+_mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w);
+
+extern void
+_mesa_WindowPos2dvMESA(const GLdouble *v);
+
+extern void
+_mesa_WindowPos2fvMESA(const GLfloat *v);
+
+extern void
+_mesa_WindowPos2ivMESA(const GLint *v);
+
+extern void
+_mesa_WindowPos2svMESA(const GLshort *v);
+
+extern void
+_mesa_WindowPos3dvMESA(const GLdouble *v);
+
+extern void
+_mesa_WindowPos3fvMESA(const GLfloat *v);
+
+extern void
+_mesa_WindowPos3ivMESA(const GLint *v);
+
+extern void
+_mesa_WindowPos3svMESA(const GLshort *v);
+
+extern void
+_mesa_WindowPos4dvMESA(const GLdouble *v);
+
+extern void
+_mesa_WindowPos4fvMESA(const GLfloat *v);
+
+extern void
+_mesa_WindowPos4ivMESA(const GLint *v);
+
+extern void
+_mesa_WindowPos4svMESA(const GLshort *v);
+
+
 #endif
index 124770df3deb6473490eadc21898b2e06398f2a8..2e1a72469da021c5c6de1cc5dacda6558171ae77 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: state.c,v 1.67 2001/06/15 14:18:46 brianp Exp $ */
+/* $Id: state.c,v 1.68 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
 #else
 #include "glheader.h"
 #include "accum.h"
-#include "alpha.h"
 #include "api_loopback.h"
 #include "attrib.h"
-#include "bitmap.h"
 #include "blend.h"
 #include "buffers.h"
 #include "clip.h"
 #include "colortab.h"
 #include "context.h"
 #include "convolve.h"
-#include "copypix.h"
 #include "depth.h"
 #include "dlist.h"
 #include "drawpix.h"
 #include "histogram.h"
 #include "light.h"
 #include "lines.h"
-#include "logic.h"
-#include "masking.h"
 #include "matrix.h"
 #include "mmath.h"
 #include "pixel.h"
-#include "pixeltex.h"
 #include "points.h"
 #include "polygon.h"
 #include "rastpos.h"
-#include "readpix.h"
-#include "scissor.h"
 #include "state.h"
 #include "stencil.h"
 #include "teximage.h"
@@ -77,7 +69,6 @@
 #include "texstate.h"
 #include "mtypes.h"
 #include "varray.h"
-#include "winpos.h"
 
 #include "math/m_matrix.h"
 #include "math/m_xform.h"
index 09bf872fe484b5124ab2fe615dbdc0583216afc3..b9bb8f5f1538a235419e3940452eed71b78b9c29 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.53 2001/06/13 14:56:14 brianp Exp $ */
+/* $Id: texstate.c,v 1.54 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -2062,3 +2062,135 @@ _mesa_ClientActiveTextureARB( GLenum target )
    FLUSH_VERTICES(ctx, _NEW_ARRAY);
    ctx->Array.ActiveTexture = texUnit;
 }
+
+
+
+/**********************************************************************/
+/*                     Pixel Texgen Extensions                        */
+/**********************************************************************/
+
+void
+_mesa_PixelTexGenSGIX(GLenum mode)
+{
+   GLenum newRgbSource, newAlphaSource;
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   switch (mode) {
+      case GL_NONE:
+         newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
+         newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
+         break;
+      case GL_ALPHA:
+         newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
+         newAlphaSource = GL_CURRENT_RASTER_COLOR;
+         break;
+      case GL_RGB:
+         newRgbSource = GL_CURRENT_RASTER_COLOR;
+         newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
+         break;
+      case GL_RGBA:
+         newRgbSource = GL_CURRENT_RASTER_COLOR;
+         newAlphaSource = GL_CURRENT_RASTER_COLOR;
+         break;
+      default:
+         _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenSGIX(mode)");
+         return;
+   }
+
+   if (newRgbSource == ctx->Pixel.FragmentRgbSource &&
+       newAlphaSource == ctx->Pixel.FragmentAlphaSource)
+      return;
+
+   FLUSH_VERTICES(ctx, _NEW_PIXEL);
+   ctx->Pixel.FragmentRgbSource = newRgbSource;
+   ctx->Pixel.FragmentAlphaSource = newAlphaSource;
+}
+
+
+void
+_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value)
+{
+   _mesa_PixelTexGenParameteriSGIS(target, (GLint) value);
+}
+
+
+void
+_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value)
+{
+   _mesa_PixelTexGenParameteriSGIS(target, (GLint) *value);
+}
+
+
+void
+_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (value != GL_CURRENT_RASTER_COLOR && value != GL_PIXEL_GROUP_COLOR_SGIS) {
+      _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(value)");
+      return;
+   }
+
+   switch (target) {
+   case GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS:
+      if (ctx->Pixel.FragmentRgbSource == (GLenum) value)
+        return;
+      FLUSH_VERTICES(ctx, _NEW_PIXEL);
+      ctx->Pixel.FragmentRgbSource = (GLenum) value;
+      break;
+   case GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS:
+      if (ctx->Pixel.FragmentAlphaSource == (GLenum) value)
+        return;
+      FLUSH_VERTICES(ctx, _NEW_PIXEL);
+      ctx->Pixel.FragmentAlphaSource = (GLenum) value;
+      break;
+   default:
+      _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(target)");
+      return;
+   }
+}
+
+
+void
+_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value)
+{
+  _mesa_PixelTexGenParameteriSGIS(target, *value);
+}
+
+
+void
+_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) {
+      *value = (GLfloat) ctx->Pixel.FragmentRgbSource;
+   }
+   else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) {
+      *value = (GLfloat) ctx->Pixel.FragmentAlphaSource;
+   }
+   else {
+      _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterfvSGIS(target)");
+   }
+}
+
+
+void
+_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+   if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) {
+      *value = (GLint) ctx->Pixel.FragmentRgbSource;
+   }
+   else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) {
+      *value = (GLint) ctx->Pixel.FragmentAlphaSource;
+   }
+   else {
+      _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterivSGIS(target)");
+   }
+}
index 551da19dcc910000cf31be9716bc7f830f4ef7b7..542fde574c46835938b2355dfa1a8cdebae49af7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: texstate.h,v 1.7 2001/03/12 00:48:39 gareth Exp $ */
+/* $Id: texstate.h,v 1.8 2001/06/18 17:26:08 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -122,4 +122,42 @@ extern void
 _mesa_ClientActiveTextureARB( GLenum target );
 
 
+/*
+ * Pixel Texture Extensions
+ */
+
+extern void
+_mesa_PixelTexGenSGIX(GLenum mode);
+
+extern void
+_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value);
+
+#ifdef VMS
+#define _mesa_PixelTexGenParameterfvSGIS _mesa_PixelTexGenParameterfv
+#endif
+extern void
+_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value);
+
+extern void
+_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value);
+
+#ifdef VMS
+#define _mesa_PixelTexGenParameterivSGIS _mesa_PixelTexGenParameteriv
+#endif
+extern void
+_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value);
+
+#ifdef VMS
+#define _mesa_GetPixelTexGenParameterfvSGIS _mesa_GetPixelTexGenParameterfv
+#endif
+extern void
+_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value);
+
+#ifdef VMS
+#define _mesa_GetPixelTexGenParameterivSGIS _mesa_GetPixelTexGenParameteriv
+#endif
+extern void
+_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value);
+
+
 #endif