Removed DD_Z_NEVER.

Replaced SEPERATE with SEPARATE.
Renumbered _NEW_ flags.
Removed _NEW_COLORTABLE.
This commit is contained in:
Brian Paul
2001-03-29 16:50:31 +00:00
parent 1b2fef5c28
commit ee403ff0ba
16 changed files with 79 additions and 107 deletions

View File

@@ -321,7 +321,7 @@ fxDDTrifuncInit(void)
/* Build an SWvertex from a GrVertex. This is workable because in /* Build an SWvertex from a GrVertex. This is workable because in
* states where the GrVertex is insufficent (eg seperate-specular), * states where the GrVertex is insufficent (eg separate-specular),
* the driver initiates a total fallback, and builds SWvertices * the driver initiates a total fallback, and builds SWvertices
* directly -- it recognizes that it will never have use for the * directly -- it recognizes that it will never have use for the
* GrVertex. * GrVertex.

View File

@@ -1,4 +1,4 @@
/* $Id: blend.c,v 1.31 2001/03/12 00:48:37 gareth Exp $ */ /* $Id: blend.c,v 1.32 2001/03/29 16:50:31 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -126,7 +126,7 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
ASSERT_OUTSIDE_BEGIN_END(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
fprintf(stderr, "glBlendFuncSeperate %s %s %s %s\n", fprintf(stderr, "glBlendFuncSeparate %s %s %s %s\n",
_mesa_lookup_enum_by_nr(sfactorRGB), _mesa_lookup_enum_by_nr(sfactorRGB),
_mesa_lookup_enum_by_nr(dfactorRGB), _mesa_lookup_enum_by_nr(dfactorRGB),
_mesa_lookup_enum_by_nr(sfactorA), _mesa_lookup_enum_by_nr(sfactorA),

View File

@@ -1,4 +1,4 @@
/* $Id: debug.c,v 1.9 2001/03/12 00:48:37 gareth Exp $ */ /* $Id: debug.c,v 1.10 2001/03/29 16:50:31 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -55,7 +55,6 @@ void _mesa_print_state( const char *msg, GLuint state )
(state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "", (state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "",
(state & _NEW_PACKUNPACK) ? "ctx->Pack/Unpack, " : "", (state & _NEW_PACKUNPACK) ? "ctx->Pack/Unpack, " : "",
(state & _NEW_ARRAY) ? "ctx->Array, " : "", (state & _NEW_ARRAY) ? "ctx->Array, " : "",
(state & _NEW_COLORTABLE) ? "ctx->{*}ColorTable, " : "",
(state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "", (state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "",
(state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : ""); (state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : "");
} }
@@ -99,7 +98,7 @@ void _mesa_print_tri_caps( const char *name, GLuint flags )
(flags & DD_FEEDBACK) ? "feedback, " : "", (flags & DD_FEEDBACK) ? "feedback, " : "",
(flags & DD_SELECT) ? "select, " : "", (flags & DD_SELECT) ? "select, " : "",
(flags & DD_FLATSHADE) ? "flat-shade, " : "", (flags & DD_FLATSHADE) ? "flat-shade, " : "",
(flags & DD_SEPERATE_SPECULAR) ? "seperate-specular, " : "", (flags & DD_SEPARATE_SPECULAR) ? "separate-specular, " : "",
(flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "", (flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "",
(flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "", (flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "",
(flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "", (flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "",

View File

@@ -1,4 +1,4 @@
/* $Id: depth.c,v 1.27 2001/03/12 00:48:37 gareth Exp $ */ /* $Id: depth.c,v 1.28 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -93,11 +93,6 @@ _mesa_DepthFunc( GLenum func )
FLUSH_VERTICES(ctx, _NEW_DEPTH); FLUSH_VERTICES(ctx, _NEW_DEPTH);
ctx->Depth.Func = func; ctx->Depth.Func = func;
if (func == GL_NEVER)
ctx->_TriangleCaps |= DD_Z_NEVER;
else
ctx->_TriangleCaps &= ~DD_Z_NEVER;
if (ctx->Driver.DepthFunc) if (ctx->Driver.DepthFunc)
ctx->Driver.DepthFunc( ctx, func ); ctx->Driver.DepthFunc( ctx, func );
} }

View File

@@ -1,4 +1,4 @@
/* $Id: enable.c,v 1.45 2001/03/12 00:48:37 gareth Exp $ */ /* $Id: enable.c,v 1.46 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -277,9 +277,9 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
if ((ctx->Light.Enabled && if ((ctx->Light.Enabled &&
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|| ctx->Fog.ColorSumEnabled) || ctx->Fog.ColorSumEnabled)
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR; ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
else else
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR; ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR;
break; break;
case GL_LINE_SMOOTH: case GL_LINE_SMOOTH:
@@ -736,9 +736,9 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
if ((ctx->Light.Enabled && if ((ctx->Light.Enabled &&
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|| ctx->Fog.ColorSumEnabled) || ctx->Fog.ColorSumEnabled)
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR; ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
else else
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR; ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR;
break; break;

View File

@@ -1,4 +1,4 @@
/* $Id: glheader.h,v 1.18 2001/03/12 00:48:38 gareth Exp $ */ /* $Id: glheader.h,v 1.19 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -161,6 +161,11 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
#endif #endif
/* This is a macro on IRIX */
#ifdef _P
#undef _P
#endif
#include "GL/gl.h" #include "GL/gl.h"

View File

@@ -1,4 +1,4 @@
/* $Id: light.c,v 1.41 2001/03/12 00:48:38 gareth Exp $ */ /* $Id: light.c,v 1.42 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -425,9 +425,9 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params )
if ((ctx->Light.Enabled && if ((ctx->Light.Enabled &&
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR) ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|| ctx->Fog.ColorSumEnabled) || ctx->Fog.ColorSumEnabled)
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR; ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
else else
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR; ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR;
break; break;
default: default:

View File

@@ -1,4 +1,4 @@
/* $Id: mtypes.h,v 1.35 2001/03/28 21:36:31 gareth Exp $ */ /* $Id: mtypes.h,v 1.36 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -41,12 +41,6 @@
#endif #endif
/* This is a macro on IRIX */
#ifdef _P
#undef _P
#endif
/* Please try to mark derived values with a leading underscore ('_'). /* Please try to mark derived values with a leading underscore ('_').
*/ */
@@ -680,22 +674,22 @@ struct gl_stencil_attrib {
#define TEXTURE3_3D (TEXTURE0_3D << 12) #define TEXTURE3_3D (TEXTURE0_3D << 12)
#define TEXTURE3_CUBE (TEXTURE0_CUBE << 12) #define TEXTURE3_CUBE (TEXTURE0_CUBE << 12)
#define TEXTURE3_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE) #define TEXTURE3_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE)
#define TEXTURE4_1D (TEXTURE0_1D << 16) /* Texture unit 3 */ #define TEXTURE4_1D (TEXTURE0_1D << 16) /* Texture unit 4 */
#define TEXTURE4_2D (TEXTURE0_2D << 16) #define TEXTURE4_2D (TEXTURE0_2D << 16)
#define TEXTURE4_3D (TEXTURE0_3D << 16) #define TEXTURE4_3D (TEXTURE0_3D << 16)
#define TEXTURE4_CUBE (TEXTURE0_CUBE << 16) #define TEXTURE4_CUBE (TEXTURE0_CUBE << 16)
#define TEXTURE5_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE) #define TEXTURE5_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE)
#define TEXTURE5_1D (TEXTURE0_1D << 20) /* Texture unit 3 */ #define TEXTURE5_1D (TEXTURE0_1D << 20) /* Texture unit 5 */
#define TEXTURE5_2D (TEXTURE0_2D << 20) #define TEXTURE5_2D (TEXTURE0_2D << 20)
#define TEXTURE5_3D (TEXTURE0_3D << 20) #define TEXTURE5_3D (TEXTURE0_3D << 20)
#define TEXTURE5_CUBE (TEXTURE0_CUBE << 20) #define TEXTURE5_CUBE (TEXTURE0_CUBE << 20)
#define TEXTURE5_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE) #define TEXTURE5_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE)
#define TEXTURE6_1D (TEXTURE0_1D << 24) /* Texture unit 3 */ #define TEXTURE6_1D (TEXTURE0_1D << 24) /* Texture unit 6 */
#define TEXTURE6_2D (TEXTURE0_2D << 24) #define TEXTURE6_2D (TEXTURE0_2D << 24)
#define TEXTURE6_3D (TEXTURE0_3D << 24) #define TEXTURE6_3D (TEXTURE0_3D << 24)
#define TEXTURE6_CUBE (TEXTURE0_CUBE << 24) #define TEXTURE6_CUBE (TEXTURE0_CUBE << 24)
#define TEXTURE6_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE) #define TEXTURE6_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE)
#define TEXTURE7_1D (TEXTURE0_1D << 28) /* Texture unit 3 */ #define TEXTURE7_1D (TEXTURE0_1D << 28) /* Texture unit 7 */
#define TEXTURE7_2D (TEXTURE0_2D << 28) #define TEXTURE7_2D (TEXTURE0_2D << 28)
#define TEXTURE7_3D (TEXTURE0_3D << 28) #define TEXTURE7_3D (TEXTURE0_3D << 28)
#define TEXTURE7_CUBE (TEXTURE0_CUBE << 28) #define TEXTURE7_CUBE (TEXTURE0_CUBE << 28)
@@ -979,7 +973,6 @@ struct gl_attrib_node {
}; };
/* /*
* Client pixel packing/unpacking attributes * Client pixel packing/unpacking attributes
*/ */
@@ -1008,8 +1001,6 @@ struct gl_client_array {
}; };
struct gl_array_attrib { struct gl_array_attrib {
struct gl_client_array Vertex; /* client data descriptors */ struct gl_client_array Vertex; /* client data descriptors */
struct gl_client_array Normal; struct gl_client_array Normal;
@@ -1030,8 +1021,6 @@ struct gl_array_attrib {
}; };
struct gl_feedback { struct gl_feedback {
GLenum Type; GLenum Type;
GLuint _Mask; /* FB_* bits */ GLuint _Mask; /* FB_* bits */
@@ -1041,7 +1030,6 @@ struct gl_feedback {
}; };
struct gl_selection { struct gl_selection {
GLuint *Buffer; GLuint *Buffer;
GLuint BufferSize; /* size of SelectBuffer */ GLuint BufferSize; /* size of SelectBuffer */
@@ -1054,7 +1042,6 @@ struct gl_selection {
}; };
/* /*
* 1-D Evaluator control points * 1-D Evaluator control points
*/ */
@@ -1105,7 +1092,6 @@ struct gl_evaluators {
}; };
/* /*
* State which can be shared by multiple contexts: * State which can be shared by multiple contexts:
*/ */
@@ -1126,7 +1112,6 @@ struct gl_shared_state {
}; };
/* /*
* A "frame buffer" is a color buffer and its optional ancillary buffers: * A "frame buffer" is a color buffer and its optional ancillary buffers:
* depth, accum, stencil, and software-simulated alpha buffers. * depth, accum, stencil, and software-simulated alpha buffers.
@@ -1166,7 +1151,8 @@ struct gl_frame_buffer {
/* /*
* Constants which may be overriden by device driver. * Constants which may be overriden by device driver during context creation
* but are never changed after that.
*/ */
struct gl_constants { struct gl_constants {
GLint MaxTextureSize; GLint MaxTextureSize;
@@ -1298,25 +1284,21 @@ struct gl_extensions {
#define _NEW_EVAL 0x80 /* ctx->Eval, ctx->EvalMap */ #define _NEW_EVAL 0x80 /* ctx->Eval, ctx->EvalMap */
#define _NEW_FOG 0x100 /* ctx->Fog */ #define _NEW_FOG 0x100 /* ctx->Fog */
#define _NEW_HINT 0x200 /* ctx->Hint */ #define _NEW_HINT 0x200 /* ctx->Hint */
#define _NEW_400 0x400 /* */ #define _NEW_LIGHT 0x400 /* ctx->Light */
#define _NEW_LIGHT 0x800 /* ctx->Light */ #define _NEW_LINE 0x800 /* ctx->Line */
#define _NEW_1000 0x1000 /* */ #define _NEW_PIXEL 0x1000 /* ctx->Pixel */
#define _NEW_LINE 0x2000 /* ctx->Line */ #define _NEW_POINT 0x2000 /* ctx->Point */
#define _NEW_4000 0x4000 /* */ #define _NEW_POLYGON 0x4000 /* ctx->Polygon */
#define _NEW_PIXEL 0x8000 /* ctx->Pixel */ #define _NEW_POLYGONSTIPPLE 0x8000 /* ctx->PolygonStipple */
#define _NEW_POINT 0x10000 /* ctx->Point */ #define _NEW_SCISSOR 0x10000 /* ctx->Scissor */
#define _NEW_POLYGON 0x20000 /* ctx->Polygon */ #define _NEW_STENCIL 0x20000 /* ctx->Stencil */
#define _NEW_POLYGONSTIPPLE 0x40000 /* ctx->PolygonStipple */ #define _NEW_TEXTURE 0x40000 /* ctx->Texture */
#define _NEW_SCISSOR 0x80000 /* ctx->Scissor */ #define _NEW_TRANSFORM 0x80000 /* ctx->Transform */
#define _NEW_STENCIL 0x100000 /* ctx->Stencil */ #define _NEW_VIEWPORT 0x100000 /* ctx->Viewport */
#define _NEW_TEXTURE 0x200000 /* ctx->Texture */ #define _NEW_PACKUNPACK 0x200000 /* ctx->Pack, ctx->Unpack */
#define _NEW_TRANSFORM 0x400000 /* ctx->Transform */ #define _NEW_ARRAY 0x400000 /* ctx->Array */
#define _NEW_VIEWPORT 0x800000 /* ctx->Viewport */ #define _NEW_RENDERMODE 0x800000 /* RenderMode, Feedback, Select */
#define _NEW_PACKUNPACK 0x1000000 /* ctx->Pack, ctx->Unpack */ #define _NEW_BUFFERS 0x1000000 /* ctx->Visual, ctx->DrawBuffer, */
#define _NEW_ARRAY 0x2000000 /* ctx->Array */
#define _NEW_COLORTABLE 0x4000000 /* ctx->{*}ColorTable */
#define _NEW_RENDERMODE 0x8000000 /* RenderMode, Feedback, Select */
#define _NEW_BUFFERS 0x10000000 /* ctx->Visual, ctx->DrawBuffer, */
#define _NEW_ALL ~0 #define _NEW_ALL ~0
@@ -1341,14 +1323,14 @@ struct gl_extensions {
#define _NEW_ARRAY_TEXCOORD_7 0x4000 #define _NEW_ARRAY_TEXCOORD_7 0x4000
#define _NEW_ARRAY_ALL 0x7fff #define _NEW_ARRAY_ALL 0x7fff
#define _NEW_ARRAY_TEXCOORD(i) (_NEW_ARRAY_TEXCOORD_0<<(i)) #define _NEW_ARRAY_TEXCOORD(i) (_NEW_ARRAY_TEXCOORD_0 << (i))
/* A bunch of flags that we think might be useful to drivers. /* A bunch of flags that we think might be useful to drivers.
*/ */
#define DD_FEEDBACK 0x1 #define DD_FEEDBACK 0x1
#define DD_SELECT 0x2 #define DD_SELECT 0x2
#define DD_FLATSHADE 0x4 #define DD_FLATSHADE 0x4
#define DD_SEPERATE_SPECULAR 0x10 #define DD_SEPARATE_SPECULAR 0x10
#define DD_TRI_LIGHT_TWOSIDE 0x20 #define DD_TRI_LIGHT_TWOSIDE 0x20
#define DD_TRI_UNFILLED 0x40 #define DD_TRI_UNFILLED 0x40
#define DD_TRI_SMOOTH 0x80 #define DD_TRI_SMOOTH 0x80
@@ -1361,8 +1343,7 @@ struct gl_extensions {
#define DD_POINT_SIZE 0x8000 #define DD_POINT_SIZE 0x8000
#define DD_POINT_ATTEN 0x10000 #define DD_POINT_ATTEN 0x10000
#define DD_TRI_CULL_FRONT_BACK 0x400000 /* special case on some hw */ #define DD_TRI_CULL_FRONT_BACK 0x400000 /* special case on some hw */
#define DD_Z_NEVER 0x800000 /* special case on some hw */ #define DD_STENCIL 0x800000
#define DD_STENCIL 0x1000000
/* Define the state changes under which each of these bits might change /* Define the state changes under which each of these bits might change
*/ */
@@ -1370,7 +1351,7 @@ struct gl_extensions {
#define _DD_NEW_SELECT _NEW_RENDERMODE #define _DD_NEW_SELECT _NEW_RENDERMODE
#define _DD_NEW_FLATSHADE _NEW_LIGHT #define _DD_NEW_FLATSHADE _NEW_LIGHT
#define _DD_NEW_MULTIDRAW _NEW_COLOR #define _DD_NEW_MULTIDRAW _NEW_COLOR
#define _DD_NEW_SEPERATE_SPECULAR (_NEW_LIGHT|_NEW_FOG) #define _DD_NEW_SEPARATE_SPECULAR (_NEW_LIGHT | _NEW_FOG)
#define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT #define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT
#define _DD_NEW_TRI_UNFILLED _NEW_POLYGON #define _DD_NEW_TRI_UNFILLED _NEW_POLYGON
#define _DD_NEW_TRI_SMOOTH _NEW_POLYGON #define _DD_NEW_TRI_SMOOTH _NEW_POLYGON
@@ -1383,18 +1364,17 @@ struct gl_extensions {
#define _DD_NEW_POINT_SIZE _NEW_POINT #define _DD_NEW_POINT_SIZE _NEW_POINT
#define _DD_NEW_POINT_ATTEN _NEW_POINT #define _DD_NEW_POINT_ATTEN _NEW_POINT
#define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON #define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON
#define _DD_NEW_Z_NEVER _NEW_DEPTH
#define _DD_NEW_STENCIL _NEW_STENCIL #define _DD_NEW_STENCIL _NEW_STENCIL
#define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \
_NEW_TEXTURE | \
_NEW_POINT | \
_NEW_MODELVIEW)
#define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT| \ #define _MESA_NEW_NEED_NORMALS (_NEW_LIGHT | \
_NEW_TEXTURE| \ _NEW_TEXTURE)
_NEW_POINT| \
_NEW_MODELVIEW)
#define _MESA_NEW_NEED_NORMALS (_NEW_LIGHT| \ #define _IMAGE_NEW_TRANSFER_STATE (_NEW_PIXEL | _NEW_COLOR_MATRIX)
_NEW_TEXTURE)
#define _IMAGE_NEW_TRANSFER_STATE (_NEW_PIXEL|_NEW_COLOR_MATRIX)
#define NEED_NORMALS_TEXGEN 0x1 #define NEED_NORMALS_TEXGEN 0x1
@@ -1406,7 +1386,6 @@ struct gl_extensions {
#define NEED_EYE_POINT_ATTEN 0x8 #define NEED_EYE_POINT_ATTEN 0x8
/* /*
* Forward declaration of display list datatypes: * Forward declaration of display list datatypes:
*/ */
@@ -1414,14 +1393,10 @@ union node;
typedef union node Node; typedef union node Node;
/* This has to be included here. */ /* This has to be included here. */
#include "dd.h" #include "dd.h"
/* /*
* Core Mesa's support for tnl modules: * Core Mesa's support for tnl modules:
*/ */

View File

@@ -1,4 +1,4 @@
/* $Id: s_aatriangle.c,v 1.11 2001/03/28 21:37:24 brianp Exp $ */ /* $Id: s_aatriangle.c,v 1.12 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -406,7 +406,7 @@ _mesa_set_aa_triangle_function(GLcontext *ctx)
ASSERT(ctx->Polygon.SmoothFlag); ASSERT(ctx->Polygon.SmoothFlag);
if (ctx->Texture._ReallyEnabled) { if (ctx->Texture._ReallyEnabled) {
if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) { if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
if (swrast->_MultiTextureEnabled) { if (swrast->_MultiTextureEnabled) {
SWRAST_CONTEXT(ctx)->Triangle = spec_multitex_aa_tri; SWRAST_CONTEXT(ctx)->Triangle = spec_multitex_aa_tri;
} }

View File

@@ -1,4 +1,4 @@
/* $Id: s_context.c,v 1.18 2001/03/19 02:25:36 keithw Exp $ */ /* $Id: s_context.c,v 1.19 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -162,7 +162,7 @@ _swrast_update_hint( GLcontext *ctx )
_SWRAST_NEW_RASTERMASK| \ _SWRAST_NEW_RASTERMASK| \
_NEW_LIGHT| \ _NEW_LIGHT| \
_NEW_FOG | \ _NEW_FOG | \
_DD_NEW_SEPERATE_SPECULAR) _DD_NEW_SEPARATE_SPECULAR)
#define _SWRAST_NEW_LINE (_SWRAST_NEW_DERIVED | \ #define _SWRAST_NEW_LINE (_SWRAST_NEW_DERIVED | \
_NEW_RENDERMODE| \ _NEW_RENDERMODE| \
@@ -171,7 +171,7 @@ _swrast_update_hint( GLcontext *ctx )
_NEW_LIGHT| \ _NEW_LIGHT| \
_NEW_FOG| \ _NEW_FOG| \
_NEW_DEPTH | \ _NEW_DEPTH | \
_DD_NEW_SEPERATE_SPECULAR) _DD_NEW_SEPARATE_SPECULAR)
#define _SWRAST_NEW_POINT (_SWRAST_NEW_DERIVED | \ #define _SWRAST_NEW_POINT (_SWRAST_NEW_DERIVED | \
_NEW_RENDERMODE | \ _NEW_RENDERMODE | \
@@ -179,7 +179,7 @@ _swrast_update_hint( GLcontext *ctx )
_NEW_TEXTURE | \ _NEW_TEXTURE | \
_NEW_LIGHT | \ _NEW_LIGHT | \
_NEW_FOG | \ _NEW_FOG | \
_DD_NEW_SEPERATE_SPECULAR) _DD_NEW_SEPARATE_SPECULAR)
#define _SWRAST_NEW_TEXTURE_SAMPLE_FUNC _NEW_TEXTURE #define _SWRAST_NEW_TEXTURE_SAMPLE_FUNC _NEW_TEXTURE
@@ -201,7 +201,7 @@ _swrast_validate_triangle( GLcontext *ctx,
_swrast_validate_derived( ctx ); _swrast_validate_derived( ctx );
swrast->choose_triangle( ctx ); swrast->choose_triangle( ctx );
if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) && if ((ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) &&
!ctx->Texture._ReallyEnabled) { !ctx->Texture._ReallyEnabled) {
swrast->SpecTriangle = swrast->Triangle; swrast->SpecTriangle = swrast->Triangle;
swrast->Triangle = _swrast_add_spec_terms_triangle; swrast->Triangle = _swrast_add_spec_terms_triangle;
@@ -218,7 +218,7 @@ _swrast_validate_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
_swrast_validate_derived( ctx ); _swrast_validate_derived( ctx );
swrast->choose_line( ctx ); swrast->choose_line( ctx );
if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) && if ((ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) &&
!ctx->Texture._ReallyEnabled) { !ctx->Texture._ReallyEnabled) {
swrast->SpecLine = swrast->Line; swrast->SpecLine = swrast->Line;
swrast->Line = _swrast_add_spec_terms_line; swrast->Line = _swrast_add_spec_terms_line;
@@ -236,7 +236,7 @@ _swrast_validate_point( GLcontext *ctx, const SWvertex *v0 )
_swrast_validate_derived( ctx ); _swrast_validate_derived( ctx );
swrast->choose_point( ctx ); swrast->choose_point( ctx );
if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) && if ((ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) &&
!ctx->Texture._ReallyEnabled) { !ctx->Texture._ReallyEnabled) {
swrast->SpecPoint = swrast->Point; swrast->SpecPoint = swrast->Point;
swrast->Point = _swrast_add_spec_terms_point; swrast->Point = _swrast_add_spec_terms_point;

View File

@@ -1,4 +1,4 @@
/* $Id: s_context.h,v 1.8 2001/03/19 02:25:36 keithw Exp $ */ /* $Id: s_context.h,v 1.9 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -152,7 +152,7 @@ typedef struct
swrast_line_func Line; swrast_line_func Line;
swrast_tri_func Triangle; swrast_tri_func Triangle;
/* Placeholders for when seperate specular (or secondary color) is /* Placeholders for when separate specular (or secondary color) is
* enabled but texturing is not. * enabled but texturing is not.
*/ */
swrast_point_func SpecPoint; swrast_point_func SpecPoint;

View File

@@ -1,4 +1,4 @@
/* $Id: s_lines.c,v 1.14 2001/03/12 00:48:42 gareth Exp $ */ /* $Id: s_lines.c,v 1.15 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -1019,7 +1019,7 @@ _swrast_choose_line( GLcontext *ctx )
} }
else if (ctx->Texture._ReallyEnabled) { else if (ctx->Texture._ReallyEnabled) {
if (swrast->_MultiTextureEnabled || if (swrast->_MultiTextureEnabled ||
(ctx->_TriangleCaps & DD_SEPERATE_SPECULAR)) { (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)) {
/* multi-texture and/or separate specular color */ /* multi-texture and/or separate specular color */
if (ctx->Light.ShadeModel==GL_SMOOTH) if (ctx->Light.ShadeModel==GL_SMOOTH)
swrast->Line = smooth_multitextured_line; swrast->Line = smooth_multitextured_line;

View File

@@ -1,4 +1,4 @@
/* $Id: s_triangle.c,v 1.23 2001/03/28 21:31:24 brianp Exp $ */ /* $Id: s_triangle.c,v 1.24 2001/03/29 16:50:32 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -2387,7 +2387,7 @@ _swrast_choose_triangle( GLcontext *ctx )
if (swrast->_MultiTextureEnabled) { if (swrast->_MultiTextureEnabled) {
USE(lambda_multitextured_triangle); USE(lambda_multitextured_triangle);
} }
else if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) { else if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
/* separate specular color interpolation */ /* separate specular color interpolation */
if (needLambda) { if (needLambda) {
USE(lambda_textured_spec_triangle); USE(lambda_textured_spec_triangle);

View File

@@ -1,4 +1,4 @@
/* $Id: ss_vbtmp.h,v 1.12 2001/03/12 00:48:43 gareth Exp $ */ /* $Id: ss_vbtmp.h,v 1.13 2001/03/29 16:50:33 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -82,7 +82,7 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
/* Tie up some dangling pointers for flat/twoside code in ss_tritmp.h /* Tie up some dangling pointers for flat/twoside code in ss_tritmp.h
*/ */
if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) == 0) { if ((ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) == 0) {
VB->SecondaryColorPtr[0] = VB->ColorPtr[0]; VB->SecondaryColorPtr[0] = VB->ColorPtr[0];
VB->SecondaryColorPtr[1] = VB->ColorPtr[1]; VB->SecondaryColorPtr[1] = VB->ColorPtr[1];
} }

View File

@@ -1,4 +1,4 @@
/* $Id: t_vb_render.c,v 1.16 2001/03/19 02:25:37 keithw Exp $ */ /* $Id: t_vb_render.c,v 1.17 2001/03/29 16:50:33 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -360,7 +360,7 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
if (ctx->Visual.rgbMode) { if (ctx->Visual.rgbMode) {
inputs |= VERT_RGBA; inputs |= VERT_RGBA;
if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
inputs |= VERT_SPEC_RGB; inputs |= VERT_SPEC_RGB;
if (ctx->Texture._ReallyEnabled) { if (ctx->Texture._ReallyEnabled) {
@@ -403,7 +403,7 @@ const struct gl_pipeline_stage _tnl_render_stage =
{ {
"render", "render",
(_NEW_BUFFERS | (_NEW_BUFFERS |
_DD_NEW_SEPERATE_SPECULAR | _DD_NEW_SEPARATE_SPECULAR |
_DD_NEW_FLATSHADE | _DD_NEW_FLATSHADE |
_NEW_TEXTURE| _NEW_TEXTURE|
_NEW_LIGHT| _NEW_LIGHT|

View File

@@ -1,4 +1,4 @@
/* $Id: t_vb_vertex.c,v 1.7 2001/03/12 00:48:44 gareth Exp $ */ /* $Id: t_vb_vertex.c,v 1.8 2001/03/29 16:50:33 brianp Exp $ */
/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
@@ -137,12 +137,10 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
TNLcontext *tnl = TNL_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb; struct vertex_buffer *VB = &tnl->vb;
if (stage->changed_inputs) if (stage->changed_inputs) {
{
/* VB->ObjPtr->size = 4; */
if (ctx->_NeedEyeCoords) { if (ctx->_NeedEyeCoords) {
/* Seperate modelview and project transformations: /* Separate modelview and project transformations:
*/ */
if (ctx->ModelView.type == MATRIX_IDENTITY) if (ctx->ModelView.type == MATRIX_IDENTITY)
VB->EyePtr = VB->ObjPtr; VB->EyePtr = VB->ObjPtr;
@@ -156,14 +154,14 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
VB->ClipPtr = TransformRaw( &store->clip, &ctx->ProjectionMatrix, VB->ClipPtr = TransformRaw( &store->clip, &ctx->ProjectionMatrix,
VB->EyePtr ); VB->EyePtr );
} }
else else {
{
/* Combined modelviewproject transform: /* Combined modelviewproject transform:
*/ */
if (ctx->_ModelProjectMatrix.type == MATRIX_IDENTITY) if (ctx->_ModelProjectMatrix.type == MATRIX_IDENTITY)
VB->ClipPtr = VB->ObjPtr; VB->ClipPtr = VB->ObjPtr;
else else
VB->ClipPtr = TransformRaw( &store->clip, &ctx->_ModelProjectMatrix, VB->ClipPtr = TransformRaw( &store->clip,
&ctx->_ModelProjectMatrix,
VB->ObjPtr ); VB->ObjPtr );
} }