mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
Consistent copyright info (version number, date) across all files.
This commit is contained in:
parent
57ffddba98
commit
22144ab755
219 changed files with 2614 additions and 2434 deletions
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: ac_context.c,v 1.2 2001/02/04 00:47:28 keithw Exp $ */
|
||||
/* $Id: ac_context.c,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
|
|||
ACcontext *ac = AC_CONTEXT(ctx);
|
||||
struct gl_client_array *cl;
|
||||
GLuint i;
|
||||
|
||||
|
||||
cl = &ac->Fallback.Normal;
|
||||
cl->Size = 3;
|
||||
cl->Type = GL_FLOAT;
|
||||
|
|
@ -243,7 +243,7 @@ void _ac_DestroyContext( GLcontext *ctx )
|
|||
if (ac->Cache.FogCoord.Ptr) FREE( ac->Cache.FogCoord.Ptr );
|
||||
|
||||
for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
|
||||
if (ac->Cache.TexCoord[i].Ptr)
|
||||
if (ac->Cache.TexCoord[i].Ptr)
|
||||
FREE( ac->Cache.TexCoord[i].Ptr );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
/* $Id: ac_context.h,v 1.2 2001/02/04 00:47:28 keithw Exp $ */
|
||||
/* $Id: ac_context.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -24,7 +23,7 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
|
@ -85,7 +84,7 @@ typedef struct {
|
|||
struct ac_array_flags IsCached;
|
||||
GLuint start;
|
||||
GLuint count;
|
||||
|
||||
|
||||
/* Facility for importing element lists:
|
||||
*/
|
||||
GLuint *Elts;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ac_import.c,v 1.8 2001/03/07 05:06:12 brianp Exp $ */
|
||||
/* $Id: ac_import.c,v 1.9 2001/03/12 00:48:41 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include "math/m_translate.h"
|
||||
#include "array_cache/ac_context.h"
|
||||
#include "math/m_translate.h"
|
||||
#include "math/m_translate.h"
|
||||
|
||||
#define STRIDE_ARRAY( array, offset ) \
|
||||
do { \
|
||||
|
|
@ -59,7 +59,7 @@ static void reset_texcoord( GLcontext *ctx, GLuint unit )
|
|||
else {
|
||||
ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit];
|
||||
|
||||
if (ctx->Current.Texcoord[unit][3] != 1.0)
|
||||
if (ctx->Current.Texcoord[unit][3] != 1.0)
|
||||
ac->Raw.TexCoord[unit].Size = 4;
|
||||
else if (ctx->Current.Texcoord[unit][2] != 0.0)
|
||||
ac->Raw.TexCoord[unit].Size = 3;
|
||||
|
|
@ -108,7 +108,7 @@ static void reset_color( GLcontext *ctx )
|
|||
ac->Raw.Color = ctx->Array.Color;
|
||||
STRIDE_ARRAY(ac->Raw.Color, ac->start);
|
||||
}
|
||||
else
|
||||
else
|
||||
ac->Raw.Color = ac->Fallback.Color;
|
||||
|
||||
ac->IsCached.Color = GL_FALSE;
|
||||
|
|
@ -124,7 +124,7 @@ static void reset_secondarycolor( GLcontext *ctx )
|
|||
ac->Raw.SecondaryColor = ctx->Array.SecondaryColor;
|
||||
STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start);
|
||||
}
|
||||
else
|
||||
else
|
||||
ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor;
|
||||
|
||||
ac->IsCached.SecondaryColor = GL_FALSE;
|
||||
|
|
@ -140,7 +140,7 @@ static void reset_index( GLcontext *ctx )
|
|||
ac->Raw.Index = ctx->Array.Index;
|
||||
STRIDE_ARRAY(ac->Raw.Index, ac->start);
|
||||
}
|
||||
else
|
||||
else
|
||||
ac->Raw.Index = ac->Fallback.Index;
|
||||
|
||||
ac->IsCached.Index = GL_FALSE;
|
||||
|
|
@ -155,7 +155,7 @@ static void reset_fogcoord( GLcontext *ctx )
|
|||
ac->Raw.FogCoord = ctx->Array.FogCoord;
|
||||
STRIDE_ARRAY(ac->Raw.FogCoord, ac->start);
|
||||
}
|
||||
else
|
||||
else
|
||||
ac->Raw.FogCoord = ac->Fallback.FogCoord;
|
||||
|
||||
ac->IsCached.FogCoord = GL_FALSE;
|
||||
|
|
@ -170,7 +170,7 @@ static void reset_edgeflag( GLcontext *ctx )
|
|||
ac->Raw.EdgeFlag = ctx->Array.EdgeFlag;
|
||||
STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start);
|
||||
}
|
||||
else
|
||||
else
|
||||
ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag;
|
||||
|
||||
ac->IsCached.EdgeFlag = GL_FALSE;
|
||||
|
|
@ -192,13 +192,13 @@ static void import_texcoord( GLcontext *ctx, GLuint unit,
|
|||
ASSERT(type == GL_FLOAT);
|
||||
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
|
||||
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
|
||||
|
||||
|
||||
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
|
||||
from->Ptr,
|
||||
from->StrideB,
|
||||
from->Type,
|
||||
from->Size,
|
||||
ac->start,
|
||||
ac->start,
|
||||
ac->count);
|
||||
|
||||
to->Size = from->Size;
|
||||
|
|
@ -224,7 +224,7 @@ static void import_vertex( GLcontext *ctx,
|
|||
from->StrideB,
|
||||
from->Type,
|
||||
from->Size,
|
||||
0,
|
||||
0,
|
||||
ac->count - ac->start);
|
||||
|
||||
to->Size = from->Size;
|
||||
|
|
@ -249,7 +249,7 @@ static void import_normal( GLcontext *ctx,
|
|||
from->Ptr,
|
||||
from->StrideB,
|
||||
from->Type,
|
||||
0,
|
||||
0,
|
||||
ac->count - ac->start);
|
||||
|
||||
to->StrideB = 3 * sizeof(GLfloat);
|
||||
|
|
@ -275,7 +275,7 @@ static void import_color( GLcontext *ctx,
|
|||
from->StrideB,
|
||||
from->Type,
|
||||
from->Size,
|
||||
0,
|
||||
0,
|
||||
ac->count - ac->start);
|
||||
|
||||
to->Size = from->Size;
|
||||
|
|
@ -300,7 +300,7 @@ static void import_index( GLcontext *ctx,
|
|||
from->Ptr,
|
||||
from->StrideB,
|
||||
from->Type,
|
||||
0,
|
||||
0,
|
||||
ac->count - ac->start);
|
||||
|
||||
to->StrideB = sizeof(GLuint);
|
||||
|
|
@ -325,7 +325,7 @@ static void import_secondarycolor( GLcontext *ctx,
|
|||
from->StrideB,
|
||||
from->Type,
|
||||
from->Size,
|
||||
0,
|
||||
0,
|
||||
ac->count - ac->start);
|
||||
|
||||
to->StrideB = 4 * sizeof(GLchan);
|
||||
|
|
@ -349,9 +349,9 @@ static void import_fogcoord( GLcontext *ctx,
|
|||
from->Ptr,
|
||||
from->StrideB,
|
||||
from->Type,
|
||||
0,
|
||||
0,
|
||||
ac->count - ac->start);
|
||||
|
||||
|
||||
to->StrideB = sizeof(GLfloat);
|
||||
to->Type = GL_FLOAT;
|
||||
ac->IsCached.FogCoord = GL_TRUE;
|
||||
|
|
@ -373,9 +373,9 @@ static void import_edgeflag( GLcontext *ctx,
|
|||
from->Ptr,
|
||||
from->StrideB,
|
||||
from->Type,
|
||||
0,
|
||||
0,
|
||||
ac->count - ac->start);
|
||||
|
||||
|
||||
to->StrideB = sizeof(GLfloat);
|
||||
to->Type = GL_FLOAT;
|
||||
ac->IsCached.EdgeFlag = GL_TRUE;
|
||||
|
|
@ -385,10 +385,10 @@ static void import_edgeflag( GLcontext *ctx,
|
|||
|
||||
/* Externals to request arrays with specific properties:
|
||||
*/
|
||||
struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
|
||||
GLuint unit,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
|
|
@ -409,7 +409,7 @@ struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
|
|||
*/
|
||||
if (ac->Raw.TexCoord[unit].Type != type ||
|
||||
(reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.TexCoord[unit])
|
||||
import_texcoord(ctx, unit, type, reqstride );
|
||||
|
|
@ -422,9 +422,9 @@ struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
|
|
@ -445,7 +445,7 @@ struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
|
|||
*/
|
||||
if (ac->Raw.Vertex.Type != type ||
|
||||
(reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.Vertex)
|
||||
import_vertex(ctx, type, reqstride );
|
||||
|
|
@ -458,9 +458,9 @@ struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
struct gl_client_array *_ac_import_normal( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_normal( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
{
|
||||
|
|
@ -468,14 +468,14 @@ struct gl_client_array *_ac_import_normal( GLcontext *ctx,
|
|||
|
||||
/* Can we keep the existing version?
|
||||
*/
|
||||
if (ac->NewArrayState & _NEW_ARRAY_NORMAL)
|
||||
if (ac->NewArrayState & _NEW_ARRAY_NORMAL)
|
||||
reset_normal( ctx );
|
||||
|
||||
/* Do we need to pull in a copy of the client data:
|
||||
*/
|
||||
if (ac->Raw.Normal.Type != type ||
|
||||
(reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.Normal)
|
||||
import_normal(ctx, type, reqstride );
|
||||
|
|
@ -488,9 +488,9 @@ struct gl_client_array *_ac_import_normal( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
struct gl_client_array *_ac_import_color( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_color( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
|
|
@ -499,7 +499,7 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx,
|
|||
|
||||
/* Can we keep the existing version?
|
||||
*/
|
||||
if (ac->NewArrayState & _NEW_ARRAY_COLOR)
|
||||
if (ac->NewArrayState & _NEW_ARRAY_COLOR)
|
||||
reset_color( ctx );
|
||||
|
||||
/* Is the request impossible?
|
||||
|
|
@ -512,7 +512,7 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx,
|
|||
*/
|
||||
if (ac->Raw.Color.Type != type ||
|
||||
(reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.Color)
|
||||
import_color(ctx, type, reqstride );
|
||||
|
|
@ -525,9 +525,9 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
struct gl_client_array *_ac_import_index( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_index( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
{
|
||||
|
|
@ -535,7 +535,7 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx,
|
|||
|
||||
/* Can we keep the existing version?
|
||||
*/
|
||||
if (ac->NewArrayState & _NEW_ARRAY_INDEX)
|
||||
if (ac->NewArrayState & _NEW_ARRAY_INDEX)
|
||||
reset_index( ctx );
|
||||
|
||||
|
||||
|
|
@ -543,7 +543,7 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx,
|
|||
*/
|
||||
if (ac->Raw.Index.Type != type ||
|
||||
(reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.Index)
|
||||
import_index(ctx, type, reqstride );
|
||||
|
|
@ -556,9 +556,9 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
|
|
@ -567,7 +567,7 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
|
|||
|
||||
/* Can we keep the existing version?
|
||||
*/
|
||||
if (ac->NewArrayState & _NEW_ARRAY_SECONDARYCOLOR)
|
||||
if (ac->NewArrayState & _NEW_ARRAY_SECONDARYCOLOR)
|
||||
reset_secondarycolor( ctx );
|
||||
|
||||
/* Is the request impossible?
|
||||
|
|
@ -579,7 +579,7 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
|
|||
*/
|
||||
if (ac->Raw.SecondaryColor.Type != type ||
|
||||
(reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.SecondaryColor)
|
||||
import_secondarycolor(ctx, type, reqstride );
|
||||
|
|
@ -592,9 +592,9 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
{
|
||||
|
|
@ -602,14 +602,14 @@ struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
|
|||
|
||||
/* Can we keep the existing version?
|
||||
*/
|
||||
if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD)
|
||||
if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD)
|
||||
reset_fogcoord( ctx );
|
||||
|
||||
/* Do we need to pull in a copy of the client data:
|
||||
*/
|
||||
if (ac->Raw.FogCoord.Type != type ||
|
||||
(reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.FogCoord)
|
||||
import_fogcoord(ctx, type, reqstride );
|
||||
|
|
@ -625,9 +625,9 @@ struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
|
|||
|
||||
|
||||
|
||||
struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
|
||||
struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwriteable,
|
||||
GLboolean *writeable )
|
||||
{
|
||||
|
|
@ -635,14 +635,14 @@ struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
|
|||
|
||||
/* Can we keep the existing version?
|
||||
*/
|
||||
if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG)
|
||||
if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG)
|
||||
reset_edgeflag( ctx );
|
||||
|
||||
/* Do we need to pull in a copy of the client data:
|
||||
*/
|
||||
if (ac->Raw.EdgeFlag.Type != type ||
|
||||
(reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) ||
|
||||
reqwriteable)
|
||||
reqwriteable)
|
||||
{
|
||||
if (!ac->IsCached.EdgeFlag)
|
||||
import_edgeflag(ctx, type, reqstride );
|
||||
|
|
@ -660,7 +660,7 @@ struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
|
|||
|
||||
|
||||
/* Clients must call this function to validate state and set bounds
|
||||
* before importing any data:
|
||||
* before importing any data:
|
||||
*/
|
||||
void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count )
|
||||
{
|
||||
|
|
@ -685,7 +685,7 @@ void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count )
|
|||
* the whole locked range always be dealt with, otherwise hard to
|
||||
* maintain cached data in the face of clipping.
|
||||
*/
|
||||
ac->NewArrayState |= ~ctx->Array._Enabled;
|
||||
ac->NewArrayState |= ~ctx->Array._Enabled;
|
||||
ac->start = ctx->Array.LockFirst;
|
||||
ac->count = ctx->Array.LockCount;
|
||||
ASSERT(ac->start == start); /* hmm? */
|
||||
|
|
@ -706,13 +706,13 @@ _ac_import_elements( GLcontext *ctx,
|
|||
CONST void *indices )
|
||||
{
|
||||
ACcontext *ac = AC_CONTEXT(ctx);
|
||||
|
||||
|
||||
if (old_type == new_type)
|
||||
return indices;
|
||||
|
||||
if (ac->elt_size < count * sizeof(GLuint)) {
|
||||
if (ac->Elts) FREE(ac->Elts);
|
||||
while (ac->elt_size < count * sizeof(GLuint))
|
||||
while (ac->elt_size < count * sizeof(GLuint))
|
||||
ac->elt_size *= 2;
|
||||
ac->Elts = (GLuint *) MALLOC(ac->elt_size);
|
||||
}
|
||||
|
|
@ -727,7 +727,7 @@ _ac_import_elements( GLcontext *ctx,
|
|||
case GL_UNSIGNED_INT: {
|
||||
GLuint *out = (GLuint *)ac->Elts;
|
||||
GLuint i;
|
||||
|
||||
|
||||
switch (old_type) {
|
||||
case GL_UNSIGNED_BYTE: {
|
||||
CONST GLubyte *in = (CONST GLubyte *)indices;
|
||||
|
|
@ -754,4 +754,3 @@ _ac_import_elements( GLcontext *ctx,
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
/* $Id: acache.h,v 1.2 2001/03/12 00:48:41 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -41,71 +43,71 @@ extern void
|
|||
_ac_InvalidateState( GLcontext *ctx, GLuint new_state );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_texcoord( GLcontext *ctx,
|
||||
_ac_import_texcoord( GLcontext *ctx,
|
||||
GLuint unit,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_vertex( GLcontext *ctx,
|
||||
_ac_import_vertex( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_normal( GLcontext *ctx,
|
||||
_ac_import_normal( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_color( GLcontext *ctx,
|
||||
_ac_import_color( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_index( GLcontext *ctx,
|
||||
_ac_import_index( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_secondarycolor( GLcontext *ctx,
|
||||
_ac_import_secondarycolor( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLuint reqsize,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_fogcoord( GLcontext *ctx,
|
||||
_ac_import_fogcoord( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
extern struct gl_client_array *
|
||||
_ac_import_edgeflag( GLcontext *ctx,
|
||||
_ac_import_edgeflag( GLcontext *ctx,
|
||||
GLenum type,
|
||||
GLuint reqstride,
|
||||
GLuint reqstride,
|
||||
GLboolean reqwritable,
|
||||
GLboolean *writable );
|
||||
|
||||
|
||||
/* Clients must call this function to validate state and set bounds
|
||||
* before importing any data:
|
||||
* before importing any data:
|
||||
*/
|
||||
extern void
|
||||
extern void
|
||||
_ac_import_range( GLcontext *ctx, GLuint start, GLuint count );
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,31 @@
|
|||
/* $Id: t_dd.c,v 1.2 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
static void copy_pv_rgba4_spec5( GLcontext *ctx, GLuint edst, GLuint esrc )
|
||||
{
|
||||
|
|
@ -29,4 +57,3 @@ static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc )
|
|||
i810Vertex *src = (i810Vertex *)(i810verts + (esrc << shift));
|
||||
dst->ui[3] = src->ui[3];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
/* $Id: t_dd_dmatmp.h,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -21,39 +23,39 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
/* Template for render stages which build and emit vertices directly
|
||||
* to fixed-size dma buffers. Useful for rendering strips and other
|
||||
* native primitives where clipping and per-vertex tweaks such as
|
||||
* those in t_dd_tritmp.h are not required.
|
||||
* those in t_dd_tritmp.h are not required.
|
||||
*
|
||||
* Produces code for both inline triangles and indexed triangles.
|
||||
* Where various primitive types are unaccelerated by hardware, the
|
||||
* code attempts to fallback to other primitive types (quadstrips to
|
||||
* tristrips, lineloops to linestrips), or to indexed vertices.
|
||||
* Ultimately, a FALLBACK() macro is invoked if there is no way to
|
||||
* render the primitive natively.
|
||||
* render the primitive natively.
|
||||
*/
|
||||
|
||||
#if !defined(HAVE_TRIANGLES)
|
||||
#error "must have at least triangles to use render template"
|
||||
#endif
|
||||
|
||||
#if !HAVE_ELTS
|
||||
#if !HAVE_ELTS
|
||||
#define ELTS_VARS
|
||||
#define ALLOC_ELTS( nr )
|
||||
#define EMIT_ELT( offset, elt )
|
||||
#define INCR_ELTS( nr )
|
||||
#define ELT_INIT(prim)
|
||||
#define ELT_INIT(prim)
|
||||
#define GET_CURRENT_VB_MAX_ELTS() 0
|
||||
#define GET_SUBSEQUENT_VB_MAX_ELTS() 0
|
||||
#define ALLOC_ELTS_NEW_PRIMITIVE(nr)
|
||||
#define RELEASE_ELT_VERTS()
|
||||
#define EMIT_INDEXED_VERTS( ctx, start, count )
|
||||
#define RELEASE_ELT_VERTS()
|
||||
#define EMIT_INDEXED_VERTS( ctx, start, count )
|
||||
#endif
|
||||
|
||||
#ifndef EMIT_TWO_ELTS
|
||||
|
|
@ -63,21 +65,21 @@ do { \
|
|||
EMIT_ELT( offset+1, elt1 ); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
/* Render whole begin/end objects */
|
||||
/**********************************************************************/
|
||||
|
||||
|
||||
|
||||
static GLboolean TAG(emit_elt_verts)( GLcontext *ctx,
|
||||
static GLboolean TAG(emit_elt_verts)( GLcontext *ctx,
|
||||
GLuint start, GLuint count )
|
||||
{
|
||||
if (HAVE_ELTS) {
|
||||
LOCAL_VARS;
|
||||
GLuint nr = count - start;
|
||||
|
||||
if ( nr >= GET_SUBSEQUENT_VB_MAX_VERTS() ) /* assumes same packing for
|
||||
if ( nr >= GET_SUBSEQUENT_VB_MAX_VERTS() ) /* assumes same packing for
|
||||
* indexed and regualar verts
|
||||
*/
|
||||
return GL_FALSE;
|
||||
|
|
@ -99,8 +101,8 @@ static void TAG(emit_elts)( GLcontext *ctx, GLuint *elts, GLuint nr )
|
|||
|
||||
ALLOC_ELTS( nr );
|
||||
|
||||
for ( i = 0 ; i < nr ; i+=2, elts += 2 ) {
|
||||
EMIT_TWO_ELTS( 0, elts[0], elts[1] );
|
||||
for ( i = 0 ; i < nr ; i+=2, elts += 2 ) {
|
||||
EMIT_TWO_ELTS( 0, elts[0], elts[1] );
|
||||
INCR_ELTS( 2 );
|
||||
}
|
||||
}
|
||||
|
|
@ -123,12 +125,12 @@ static void TAG(render_points_verts)( GLcontext *ctx,
|
|||
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
|
||||
int currentsz = GET_CURRENT_VB_MAX_VERTS();
|
||||
GLuint j, nr;
|
||||
|
||||
|
||||
INIT( GL_POINTS );
|
||||
|
||||
|
||||
if (currentsz < 8)
|
||||
currentsz = dmasz;
|
||||
|
||||
|
||||
for (j = start; j < count; j += nr ) {
|
||||
nr = MIN2( currentsz, count - j );
|
||||
EMIT_VERTS( ctx, j, nr );
|
||||
|
|
@ -151,7 +153,7 @@ static void TAG(render_lines_verts)( GLcontext *ctx,
|
|||
GLuint j, nr;
|
||||
|
||||
INIT( GL_LINES );
|
||||
|
||||
|
||||
/* Emit whole number of lines in total and in each buffer:
|
||||
*/
|
||||
count -= (count-start) & 1;
|
||||
|
|
@ -214,7 +216,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
|
|||
NEW_PRIMITIVE();
|
||||
INIT( GL_LINE_STRIP );
|
||||
|
||||
if (flags & PRIM_BEGIN)
|
||||
if (flags & PRIM_BEGIN)
|
||||
j = start;
|
||||
else
|
||||
j = start + 1;
|
||||
|
|
@ -224,7 +226,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
|
|||
currentsz--;
|
||||
dmasz--;
|
||||
|
||||
if (currentsz < 8)
|
||||
if (currentsz < 8)
|
||||
currentsz = dmasz;
|
||||
|
||||
for ( ; j < count - 1; j += nr - 1 ) {
|
||||
|
|
@ -232,8 +234,8 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
|
|||
EMIT_VERTS( ctx, j, nr );
|
||||
currentsz = dmasz;
|
||||
}
|
||||
|
||||
if (flags & PRIM_END)
|
||||
|
||||
if (flags & PRIM_END)
|
||||
EMIT_VERTS( ctx, start, 1 );
|
||||
|
||||
} else {
|
||||
|
|
@ -253,7 +255,7 @@ static void TAG(render_triangles_verts)( GLcontext *ctx,
|
|||
GLuint j, nr;
|
||||
|
||||
INIT(GL_TRIANGLES);
|
||||
|
||||
|
||||
/* Emit whole number of tris in total. dmasz is already a multiple
|
||||
* of 3.
|
||||
*/
|
||||
|
|
@ -281,12 +283,12 @@ static void TAG(render_tri_strip_verts)( GLcontext *ctx,
|
|||
GLuint j, nr;
|
||||
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
|
||||
int currentsz;
|
||||
|
||||
|
||||
INIT(GL_TRIANGLE_STRIP);
|
||||
NEW_PRIMITIVE();
|
||||
|
||||
|
||||
currentsz = GET_CURRENT_VB_MAX_VERTS();
|
||||
|
||||
|
||||
if (currentsz < 8) {
|
||||
FIRE_VERTICES();
|
||||
currentsz = dmasz;
|
||||
|
|
@ -304,7 +306,7 @@ static void TAG(render_tri_strip_verts)( GLcontext *ctx,
|
|||
*/
|
||||
dmasz -= (dmasz & 1);
|
||||
currentsz -= (currentsz & 1);
|
||||
|
||||
|
||||
for (j = start ; j < count - 2; j += nr - 2 ) {
|
||||
nr = MIN2( currentsz, count - j );
|
||||
EMIT_VERTS( ctx, j, nr );
|
||||
|
|
@ -325,7 +327,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
|
|||
GLuint j, nr;
|
||||
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
|
||||
int currentsz = GET_CURRENT_VB_MAX_VERTS();
|
||||
|
||||
|
||||
NEW_PRIMITIVE();
|
||||
INIT(GL_TRIANGLE_FAN);
|
||||
|
||||
|
|
@ -340,7 +342,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
|
|||
EMIT_VERTS( ctx, j, nr - 1 );
|
||||
currentsz = dmasz;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Could write code to emit these as indexed vertices (for the
|
||||
* g400, for instance).
|
||||
|
|
@ -368,14 +370,14 @@ static void TAG(render_poly_verts)( GLcontext *ctx,
|
|||
FIRE_VERTICES();
|
||||
currentsz = dmasz;
|
||||
}
|
||||
|
||||
|
||||
for (j = start + 1 ; j < count - 1 ; j += nr - 1 ) {
|
||||
nr = MIN2( currentsz, count - j + 1 );
|
||||
EMIT_VERTS( ctx, start, 1 );
|
||||
EMIT_VERTS( ctx, j, nr - 1 );
|
||||
currentsz = dmasz;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (HAVE_TRI_FANS && !(ctx->_TriangleCaps & DD_FLATSHADE)) {
|
||||
TAG(render_tri_fan_verts)( ctx, start, count, flags );
|
||||
} else {
|
||||
|
|
@ -394,7 +396,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
|
|||
/* TODO.
|
||||
*/
|
||||
} else if (HAVE_TRI_STRIPS && ctx->_TriangleCaps & DD_FLATSHADE) {
|
||||
if (TAG(emit_elt_verts)( ctx, start, count )) {
|
||||
if (TAG(emit_elt_verts)( ctx, start, count )) {
|
||||
LOCAL_VARS;
|
||||
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
|
||||
int currentsz;
|
||||
|
|
@ -412,7 +414,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
|
|||
dmasz -= dmasz & 1;
|
||||
count -= (count-start) & 1;
|
||||
currentsz -= currentsz & 1;
|
||||
|
||||
|
||||
if (currentsz < 12)
|
||||
currentsz = dmasz;
|
||||
|
||||
|
|
@ -428,28 +430,28 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
|
|||
|
||||
NEW_PRIMITIVE();
|
||||
ALLOC_ELTS_NEW_PRIMITIVE( quads*6 );
|
||||
|
||||
|
||||
for ( i = 0 ; i < quads*2 ; i+=2 ) {
|
||||
EMIT_TWO_ELTS( 0, (i+0), (i+1) );
|
||||
EMIT_TWO_ELTS( 2, (i+2), (i+1) );
|
||||
EMIT_TWO_ELTS( 4, (i+3), (i+2) );
|
||||
INCR_ELTS( 6 );
|
||||
}
|
||||
|
||||
|
||||
NEW_PRIMITIVE();
|
||||
}
|
||||
currentsz = dmasz;
|
||||
}
|
||||
|
||||
RELEASE_ELT_VERTS();
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Vertices won't fit in a single buffer or elts not available,
|
||||
* VERT_FALLBACK.
|
||||
*/
|
||||
VERT_FALLBACK( ctx, start, count, flags );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (HAVE_TRI_STRIPS) {
|
||||
LOCAL_VARS;
|
||||
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
|
||||
|
|
@ -465,7 +467,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
|
|||
dmasz -= dmasz & 1;
|
||||
currentsz -= currentsz & 1;
|
||||
count -= (count-start) & 1;
|
||||
|
||||
|
||||
if (currentsz < 8) {
|
||||
FIRE_VERTICES();
|
||||
currentsz = dmasz;
|
||||
|
|
@ -488,10 +490,10 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
|
|||
GLuint flags )
|
||||
{
|
||||
if (HAVE_QUADS && 0) {
|
||||
} else if (TAG(emit_elt_verts)( ctx, start, count )) {
|
||||
} else if (TAG(emit_elt_verts)( ctx, start, count )) {
|
||||
/* Hardware doesn't have a quad primitive type -- try to
|
||||
* simulate it using indexed vertices and the triangle
|
||||
* primitive:
|
||||
* primitive:
|
||||
*/
|
||||
LOCAL_VARS;
|
||||
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
|
||||
|
|
@ -532,14 +534,14 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
|
|||
EMIT_TWO_ELTS( 4, (i+2), (i+3) );
|
||||
INCR_ELTS( 6 );
|
||||
}
|
||||
|
||||
|
||||
NEW_PRIMITIVE();
|
||||
}
|
||||
currentsz = dmasz;
|
||||
}
|
||||
|
||||
|
||||
RELEASE_ELT_VERTS();
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Vertices won't fit in a single buffer, fallback.
|
||||
*/
|
||||
|
|
@ -557,7 +559,7 @@ static void TAG(render_noop)( GLcontext *ctx,
|
|||
|
||||
|
||||
|
||||
static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
|
||||
static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
|
||||
{
|
||||
TAG(render_points_verts),
|
||||
TAG(render_lines_verts),
|
||||
|
|
@ -577,7 +579,7 @@ static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
|
|||
* Render elts using hardware indexed verts *
|
||||
****************************************************************************/
|
||||
|
||||
#if (HAVE_ELTS)
|
||||
#if (HAVE_ELTS)
|
||||
static void TAG(render_points_elts)( GLcontext *ctx,
|
||||
GLuint start,
|
||||
GLuint count,
|
||||
|
|
@ -589,9 +591,9 @@ static void TAG(render_points_elts)( GLcontext *ctx,
|
|||
int currentsz;
|
||||
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
|
||||
GLuint j, nr;
|
||||
|
||||
|
||||
ELT_INIT( GL_POINTS );
|
||||
|
||||
|
||||
currentsz = GET_CURRENT_VB_MAX_ELTS();
|
||||
if (currentsz < 8)
|
||||
currentsz = dmasz;
|
||||
|
|
@ -689,34 +691,34 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
|
|||
int currentsz;
|
||||
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
|
||||
GLuint j, nr;
|
||||
|
||||
|
||||
NEW_PRIMITIVE();
|
||||
ELT_INIT( GL_LINE_STRIP );
|
||||
|
||||
if (flags & PRIM_BEGIN)
|
||||
|
||||
if (flags & PRIM_BEGIN)
|
||||
j = start;
|
||||
else
|
||||
j = start + 1;
|
||||
|
||||
|
||||
currentsz = GET_CURRENT_VB_MAX_ELTS();
|
||||
if (currentsz < 8) {
|
||||
FIRE_VERTICES();
|
||||
currentsz = dmasz;
|
||||
}
|
||||
|
||||
|
||||
/* Ensure last vertex doesn't wrap:
|
||||
*/
|
||||
currentsz--;
|
||||
dmasz--;
|
||||
|
||||
|
||||
for ( ; j < count - 1; j += nr - 1 ) {
|
||||
nr = MIN2( currentsz, count - j );
|
||||
/* NEW_PRIMITIVE(); */
|
||||
TAG(emit_elts)( ctx, elts+j, nr );
|
||||
currentsz = dmasz;
|
||||
}
|
||||
|
||||
if (flags & PRIM_END)
|
||||
|
||||
if (flags & PRIM_END)
|
||||
TAG(emit_elts)( ctx, elts+start, 1 );
|
||||
|
||||
NEW_PRIMITIVE();
|
||||
|
|
@ -744,7 +746,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx,
|
|||
|
||||
NEW_PRIMITIVE();
|
||||
ELT_INIT( GL_TRIANGLES );
|
||||
|
||||
|
||||
currentsz = GET_CURRENT_VB_MAX_ELTS();
|
||||
|
||||
/* Emit whole number of tris in total. dmasz is already a multiple
|
||||
|
|
@ -779,17 +781,17 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx,
|
|||
|
||||
NEW_PRIMITIVE();
|
||||
ELT_INIT( GL_TRIANGLE_STRIP );
|
||||
|
||||
|
||||
currentsz = GET_CURRENT_VB_MAX_ELTS();
|
||||
if (currentsz < 8) {
|
||||
FIRE_VERTICES();
|
||||
currentsz = dmasz;
|
||||
}
|
||||
|
||||
|
||||
if (flags & PRIM_PARITY) {
|
||||
TAG(emit_elts)( ctx, elts+start, 1 );
|
||||
}
|
||||
|
||||
|
||||
/* Keep the same winding over multiple buffers:
|
||||
*/
|
||||
dmasz -= (dmasz & 1);
|
||||
|
|
@ -882,7 +884,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
|
|||
GLuint flags )
|
||||
{
|
||||
if (HAVE_QUAD_STRIPS && 0) {
|
||||
}
|
||||
}
|
||||
else if (HAVE_TRI_STRIPS) {
|
||||
LOCAL_VARS;
|
||||
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
|
||||
|
|
@ -898,11 +900,11 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
|
|||
dmasz -= dmasz & 1;
|
||||
count -= (count-start) & 1;
|
||||
currentsz -= currentsz & 1;
|
||||
|
||||
|
||||
if (currentsz < 12)
|
||||
currentsz = dmasz;
|
||||
|
||||
if (ctx->_TriangleCaps & DD_FLATSHADE) {
|
||||
if (ctx->_TriangleCaps & DD_FLATSHADE) {
|
||||
ELT_INIT( GL_TRIANGLES );
|
||||
|
||||
currentsz = currentsz/6*2;
|
||||
|
|
@ -911,7 +913,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
|
|||
for (j = start; j < count - 3; j += nr - 2 ) {
|
||||
nr = MIN2( currentsz, count - j );
|
||||
|
||||
if (nr >= 4)
|
||||
if (nr >= 4)
|
||||
{
|
||||
GLint i;
|
||||
GLint quads = (nr/2)-1;
|
||||
|
|
@ -920,20 +922,20 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
|
|||
|
||||
NEW_PRIMITIVE();
|
||||
ALLOC_ELTS_NEW_PRIMITIVE( quads*6 );
|
||||
|
||||
|
||||
for ( i = 0 ; i < quads ; i++, elts += 2 ) {
|
||||
EMIT_TWO_ELTS( 0, elts[0], elts[1] );
|
||||
EMIT_TWO_ELTS( 2, elts[2], elts[1] );
|
||||
EMIT_TWO_ELTS( 4, elts[3], elts[2] );
|
||||
INCR_ELTS( 6 );
|
||||
}
|
||||
|
||||
|
||||
NEW_PRIMITIVE();
|
||||
}
|
||||
|
||||
currentsz = dmasz;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
ELT_INIT( GL_TRIANGLE_STRIP );
|
||||
|
||||
|
|
@ -981,7 +983,7 @@ static void TAG(render_quads_elts)( GLcontext *ctx,
|
|||
for (j = start; j < count - 3; j += nr - 2 ) {
|
||||
nr = MIN2( currentsz, count - j );
|
||||
|
||||
if (nr >= 4)
|
||||
if (nr >= 4)
|
||||
{
|
||||
GLint quads = nr/4;
|
||||
GLint i;
|
||||
|
|
@ -1005,7 +1007,7 @@ static void TAG(render_quads_elts)( GLcontext *ctx,
|
|||
|
||||
|
||||
|
||||
static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
|
||||
static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
|
||||
{
|
||||
TAG(render_points_elts),
|
||||
TAG(render_lines_elts),
|
||||
|
|
@ -1020,4 +1022,3 @@ static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
|
|||
TAG(render_noop),
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: t_dd_rendertmp.h,v 1.1 2001/02/16 18:14:42 keithw Exp $ */
|
||||
/* $Id: t_dd_rendertmp.h,v 1.2 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
|
@ -33,13 +33,13 @@
|
|||
#endif
|
||||
|
||||
#ifndef INIT
|
||||
#define INIT(x)
|
||||
#define INIT(x)
|
||||
#endif
|
||||
|
||||
#ifndef NEED_EDGEFLAG_SETUP
|
||||
#define NEED_EDGEFLAG_SETUP 0
|
||||
#define EDGEFLAG_GET(a) 0
|
||||
#define EDGEFLAG_SET(a,b) (void)b
|
||||
#define EDGEFLAG_SET(a,b) (void)b
|
||||
#endif
|
||||
|
||||
#ifndef RESET_STIPPLE
|
||||
|
|
@ -109,7 +109,7 @@ static void TAG(render_line_strip)( GLcontext *ctx,
|
|||
RESET_OCCLUSION;
|
||||
INIT(GL_LINE_STRIP);
|
||||
|
||||
for (j=start+1; j<count; j++ )
|
||||
for (j=start+1; j<count; j++ )
|
||||
RENDER_LINE( ELT(j-1), ELT(j) );
|
||||
|
||||
if (TEST_PRIM_END(flags))
|
||||
|
|
@ -124,7 +124,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
|
|||
GLuint count,
|
||||
GLuint flags )
|
||||
{
|
||||
GLuint i;
|
||||
GLuint i;
|
||||
LOCAL_VARS;
|
||||
|
||||
(void) flags;
|
||||
|
|
@ -186,10 +186,10 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
|
|||
GLuint j;
|
||||
GLuint parity = 0;
|
||||
LOCAL_VARS;
|
||||
|
||||
|
||||
if (TEST_PRIM_PARITY(flags))
|
||||
parity = 1;
|
||||
|
||||
|
||||
INIT(GL_TRIANGLE_STRIP);
|
||||
if (NEED_EDGEFLAG_SETUP) {
|
||||
for (j=start+2;j<count;j++,parity^=1) {
|
||||
|
|
@ -273,13 +273,13 @@ static void TAG(render_poly)( GLcontext *ctx,
|
|||
/* If the primitive does not begin here, the first edge
|
||||
* is non-boundary.
|
||||
*/
|
||||
if (!TEST_PRIM_BEGIN(flags))
|
||||
if (!TEST_PRIM_BEGIN(flags))
|
||||
EDGEFLAG_SET( ELT(start), GL_FALSE );
|
||||
|
||||
/* If the primitive does not end here, the final edge is
|
||||
* non-boundary.
|
||||
*/
|
||||
if (!TEST_PRIM_END(flags))
|
||||
if (!TEST_PRIM_END(flags))
|
||||
EDGEFLAG_SET( ELT(count-1), GL_FALSE );
|
||||
|
||||
/* Draw the first triangles (possibly zero)
|
||||
|
|
@ -290,7 +290,7 @@ static void TAG(render_poly)( GLcontext *ctx,
|
|||
RENDER_TRI( ELT(j-1), ELT(j), ELT(start) );
|
||||
EDGEFLAG_SET( ELT(j), ef );
|
||||
j++;
|
||||
|
||||
|
||||
/* Don't render the first edge again:
|
||||
*/
|
||||
EDGEFLAG_SET( ELT(start), GL_FALSE );
|
||||
|
|
@ -312,7 +312,7 @@ static void TAG(render_poly)( GLcontext *ctx,
|
|||
*/
|
||||
EDGEFLAG_SET( ELT(count-1), efcount );
|
||||
EDGEFLAG_SET( ELT(start), efstart );
|
||||
|
||||
|
||||
if (TEST_PRIM_END(flags)) {
|
||||
RESET_STIPPLE;
|
||||
}
|
||||
|
|
@ -348,7 +348,7 @@ static void TAG(render_quads)( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
POSTFIX;
|
||||
}
|
||||
}
|
||||
|
||||
static void TAG(render_quad_strip)( GLcontext *ctx,
|
||||
GLuint start,
|
||||
|
|
@ -399,7 +399,7 @@ static void TAG(render_noop)( GLcontext *ctx,
|
|||
RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
|
||||
GLuint,
|
||||
GLuint,
|
||||
GLuint) =
|
||||
GLuint) =
|
||||
{
|
||||
TAG(render_points),
|
||||
TAG(render_lines),
|
||||
|
|
@ -436,4 +436,3 @@ RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
|
|||
|
||||
#undef PRESERVE_VB_DEFS
|
||||
#undef PRESERVE_TAG
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,22 @@
|
|||
/* $Id: t_dd_tritmp.h,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001
|
||||
Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -22,19 +24,19 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
/* Template for building functions to plug into the driver interface
|
||||
* of t_vb_render.c:
|
||||
* ctx->Driver.QuadFunc
|
||||
* ctx->Driver.TriangleFunc
|
||||
* ctx->Driver.LineFunc
|
||||
* ctx->Driver.PointsFunc
|
||||
* ctx->Driver.QuadFunc
|
||||
* ctx->Driver.TriangleFunc
|
||||
* ctx->Driver.LineFunc
|
||||
* ctx->Driver.PointsFunc
|
||||
*
|
||||
* DO_TWOSIDE: Plug back-color values from the VB into backfacing triangles,
|
||||
* DO_TWOSIDE: Plug back-color values from the VB into backfacing triangles,
|
||||
* and restore vertices afterwards.
|
||||
* DO_OFFSET: Calculate offset for triangles and adjust vertices. Restore
|
||||
* vertices after rendering.
|
||||
|
|
@ -67,39 +69,39 @@
|
|||
#if HAVE_RGBA
|
||||
#define VERT_SET_IND( v, c ) (void) c
|
||||
#define VERT_COPY_IND( v0, v1 )
|
||||
#define VERT_SAVE_IND( idx )
|
||||
#define VERT_RESTORE_IND( idx )
|
||||
#if HAVE_BACK_COLORS
|
||||
#define VERT_SET_RGBA( v, c )
|
||||
#endif
|
||||
#define VERT_SAVE_IND( idx )
|
||||
#define VERT_RESTORE_IND( idx )
|
||||
#if HAVE_BACK_COLORS
|
||||
#define VERT_SET_RGBA( v, c )
|
||||
#endif
|
||||
#else
|
||||
#define VERT_SET_RGBA( v, c ) (void) c
|
||||
#define VERT_COPY_RGBA( v0, v1 )
|
||||
#define VERT_SAVE_RGBA( idx )
|
||||
#define VERT_RESTORE_RGBA( idx )
|
||||
#if HAVE_BACK_COLORS
|
||||
#define VERT_SET_IND( v, c )
|
||||
#endif
|
||||
#define VERT_SAVE_RGBA( idx )
|
||||
#define VERT_RESTORE_RGBA( idx )
|
||||
#if HAVE_BACK_COLORS
|
||||
#define VERT_SET_IND( v, c )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_SPEC
|
||||
#define VERT_SET_SPEC( v, c ) (void) c
|
||||
#define VERT_COPY_SPEC( v0, v1 )
|
||||
#define VERT_SAVE_SPEC( idx )
|
||||
#define VERT_RESTORE_SPEC( idx )
|
||||
#define VERT_SAVE_SPEC( idx )
|
||||
#define VERT_RESTORE_SPEC( idx )
|
||||
#if HAVE_BACK_COLORS
|
||||
#define VERT_COPY_SPEC1( v )
|
||||
#endif
|
||||
#else
|
||||
#if HAVE_BACK_COLORS
|
||||
#define VERT_SET_SPEC( v, c )
|
||||
#define VERT_SET_SPEC( v, c )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_BACK_COLORS
|
||||
#define VERT_COPY_SPEC1( v )
|
||||
#define VERT_COPY_IND1( v )
|
||||
#define VERT_COPY_RGBA1( v )
|
||||
#define VERT_COPY_RGBA1( v )
|
||||
#endif
|
||||
|
||||
#ifndef INSANE_VERTICES
|
||||
|
|
@ -139,7 +141,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
if (DO_UNFILLED) {
|
||||
if (facing) {
|
||||
mode = ctx->Polygon.BackMode;
|
||||
if (ctx->Polygon.CullFlag &&
|
||||
if (ctx->Polygon.CullFlag &&
|
||||
ctx->Polygon.CullFaceMode != GL_FRONT) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -174,7 +176,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
VERT_SAVE_SPEC( 2 );
|
||||
VERT_COPY_SPEC1( v[2] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLchan (*vbcolor)[4] = VB->ColorPtr[1]->data;
|
||||
ASSERT(VB->ColorPtr[1]->stride == 4*sizeof(GLchan));
|
||||
|
|
@ -185,17 +187,17 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
VERT_SET_RGBA( v[1], vbcolor[e1] );
|
||||
}
|
||||
VERT_SET_RGBA( v[2], vbcolor[e2] );
|
||||
|
||||
|
||||
if (HAVE_SPEC && VB->SecondaryColorPtr[1]) {
|
||||
GLchan (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
|
||||
|
||||
|
||||
if (!DO_FLAT) {
|
||||
VERT_SET_SPEC( v[0], vbspec[e0] );
|
||||
VERT_SET_SPEC( v[1], vbspec[e1] );
|
||||
}
|
||||
VERT_SET_SPEC( v[2], vbspec[e2] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLuint *vbindex = VB->IndexPtr[1]->data;
|
||||
|
|
@ -243,7 +245,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
VERT_COPY_SPEC( v[0], v[2] );
|
||||
VERT_COPY_SPEC( v[1], v[2] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERT_SAVE_IND( 0 );
|
||||
VERT_SAVE_IND( 1 );
|
||||
|
|
@ -274,7 +276,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
}
|
||||
if (DO_UNFILLED)
|
||||
RASTERIZE( GL_TRIANGLES );
|
||||
TRI( v[0], v[1], v[2] );
|
||||
TRI( v[0], v[1], v[2] );
|
||||
}
|
||||
|
||||
if (DO_OFFSET)
|
||||
|
|
@ -296,22 +298,22 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
VERT_RESTORE_SPEC( 1 );
|
||||
VERT_RESTORE_SPEC( 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLchan (*vbcolor)[4] = VB->ColorPtr[0]->data;
|
||||
ASSERT(VB->ColorPtr[0]->stride == 4*sizeof(GLchan));
|
||||
(void) vbcolor;
|
||||
|
||||
|
||||
if (!DO_FLAT) {
|
||||
VERT_SET_RGBA( v[0], vbcolor[e0] );
|
||||
VERT_SET_RGBA( v[1], vbcolor[e1] );
|
||||
}
|
||||
VERT_SET_RGBA( v[2], vbcolor[e2] );
|
||||
|
||||
|
||||
if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
|
||||
GLchan (*vbspec)[4] = VB->SecondaryColorPtr[0]->data;
|
||||
ASSERT(VB->SecondaryColorPtr[0]->stride == 4*sizeof(GLchan));
|
||||
|
||||
|
||||
if (!DO_FLAT) {
|
||||
VERT_SET_SPEC( v[0], vbspec[e0] );
|
||||
VERT_SET_SPEC( v[1], vbspec[e1] );
|
||||
|
|
@ -319,7 +321,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
VERT_SET_SPEC( v[2], vbspec[e2] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLuint *vbindex = VB->IndexPtr[0]->data;
|
||||
if (!DO_FLAT) {
|
||||
|
|
@ -339,7 +341,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
|
|||
VERT_RESTORE_SPEC( 0 );
|
||||
VERT_RESTORE_SPEC( 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERT_RESTORE_IND( 0 );
|
||||
VERT_RESTORE_IND( 1 );
|
||||
|
|
@ -381,7 +383,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
if (DO_UNFILLED) {
|
||||
if (facing) {
|
||||
mode = ctx->Polygon.BackMode;
|
||||
if (ctx->Polygon.CullFlag &&
|
||||
if (ctx->Polygon.CullFlag &&
|
||||
ctx->Polygon.CullFaceMode != GL_FRONT) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -399,7 +401,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
if (HAVE_RGBA) {
|
||||
GLchan (*vbcolor)[4] = VB->ColorPtr[1]->data;
|
||||
(void)vbcolor;
|
||||
|
||||
|
||||
if (!DO_FLAT) {
|
||||
VERT_SET_RGBA( v[0], vbcolor[e0] );
|
||||
VERT_SET_RGBA( v[1], vbcolor[e1] );
|
||||
|
|
@ -471,7 +473,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
VERT_COPY_SPEC( v[1], v[3] );
|
||||
VERT_COPY_SPEC( v[2], v[3] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERT_SAVE_IND( 0 );
|
||||
VERT_SAVE_IND( 1 );
|
||||
|
|
@ -506,7 +508,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
VERT_Z_ADD(v[3], offset);
|
||||
}
|
||||
RASTERIZE( GL_TRIANGLES );
|
||||
QUAD( (v[0]), (v[1]), (v[2]), (v[3]) );
|
||||
QUAD( (v[0]), (v[1]), (v[2]), (v[3]) );
|
||||
}
|
||||
|
||||
if (DO_OFFSET)
|
||||
|
|
@ -515,7 +517,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
VERT_SET_Z(v[1], z[1]);
|
||||
VERT_SET_Z(v[2], z[2]);
|
||||
VERT_SET_Z(v[3], z[3]);
|
||||
}
|
||||
}
|
||||
|
||||
if (DO_TWOSIDE && facing == 1)
|
||||
{
|
||||
|
|
@ -523,18 +525,18 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
GLchan (*vbcolor)[4] = VB->ColorPtr[0]->data;
|
||||
ASSERT(VB->ColorPtr[0]->stride == 4*sizeof(GLchan));
|
||||
(void) vbcolor;
|
||||
|
||||
|
||||
if (!DO_FLAT) {
|
||||
VERT_SET_RGBA( v[0], vbcolor[e0] );
|
||||
VERT_SET_RGBA( v[1], vbcolor[e1] );
|
||||
VERT_SET_RGBA( v[2], vbcolor[e2] );
|
||||
}
|
||||
VERT_SET_RGBA( v[3], vbcolor[e3] );
|
||||
|
||||
|
||||
if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
|
||||
GLchan (*vbspec)[4] = VB->SecondaryColorPtr[0]->data;
|
||||
ASSERT(VB->SecondaryColorPtr[0]->stride == 4*sizeof(GLchan));
|
||||
|
||||
|
||||
if (!DO_FLAT) {
|
||||
VERT_SET_SPEC( v[0], vbspec[e0] );
|
||||
VERT_SET_SPEC( v[1], vbspec[e1] );
|
||||
|
|
@ -542,7 +544,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
}
|
||||
VERT_SET_SPEC( v[3], vbspec[e3] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLuint *vbindex = VB->IndexPtr[0]->data;
|
||||
if (!DO_FLAT) {
|
||||
|
|
@ -565,7 +567,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
VERT_RESTORE_SPEC( 1 );
|
||||
VERT_RESTORE_SPEC( 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERT_RESTORE_IND( 0 );
|
||||
VERT_RESTORE_IND( 1 );
|
||||
|
|
@ -573,7 +575,7 @@ static void TAG(quad)( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
static void TAG(quad)( GLcontext *ctx, GLuint e0,
|
||||
GLuint e1, GLuint e2, GLuint e3 )
|
||||
{
|
||||
|
|
@ -581,12 +583,12 @@ static void TAG(quad)( GLcontext *ctx, GLuint e0,
|
|||
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
|
||||
GLubyte ef1 = VB->EdgeFlag[e1];
|
||||
GLubyte ef3 = VB->EdgeFlag[e3];
|
||||
VB->EdgeFlag[e1] = 0;
|
||||
VB->EdgeFlag[e1] = 0;
|
||||
TAG(triangle)( ctx, e0, e1, e3 );
|
||||
VB->EdgeFlag[e1] = ef1;
|
||||
VB->EdgeFlag[e3] = 0;
|
||||
TAG(triangle)( ctx, e1, e2, e3 );
|
||||
VB->EdgeFlag[e3] = ef3;
|
||||
VB->EdgeFlag[e3] = 0;
|
||||
TAG(triangle)( ctx, e1, e2, e3 );
|
||||
VB->EdgeFlag[e3] = ef3;
|
||||
} else {
|
||||
TAG(triangle)( ctx, e0, e1, e3 );
|
||||
TAG(triangle)( ctx, e1, e2, e3 );
|
||||
|
|
@ -613,7 +615,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
|
|||
VERT_SAVE_SPEC( 0 );
|
||||
VERT_COPY_SPEC( v[0], v[1] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERT_SAVE_IND( 0 );
|
||||
VERT_COPY_IND( v[0], v[1] );
|
||||
|
|
@ -629,7 +631,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
|
|||
if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
|
||||
VERT_RESTORE_SPEC( 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERT_RESTORE_IND( 0 );
|
||||
}
|
||||
|
|
@ -687,17 +689,17 @@ static void TAG(init)( void )
|
|||
#undef VERT_COPY_IND
|
||||
#undef VERT_SAVE_IND
|
||||
#undef VERT_RESTORE_IND
|
||||
#if HAVE_BACK_COLORS
|
||||
#if HAVE_BACK_COLORS
|
||||
#undef VERT_SET_RGBA
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#undef VERT_SET_RGBA
|
||||
#undef VERT_COPY_RGBA
|
||||
#undef VERT_SAVE_RGBA
|
||||
#undef VERT_RESTORE_RGBA
|
||||
#if HAVE_BACK_COLORS
|
||||
#if HAVE_BACK_COLORS
|
||||
#undef VERT_SET_IND
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !HAVE_SPEC
|
||||
|
|
@ -724,4 +726,3 @@ static void TAG(init)( void )
|
|||
#undef VERT_SET_Z
|
||||
#undef VERT_Z_ADD
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,47 @@
|
|||
/* $Id: t_dd_unfilled.h,v 1.3 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
#if HAVE_RGBA
|
||||
#define VERT_SET_IND( v, c )
|
||||
#define VERT_SET_IND( v, c )
|
||||
#define VERT_COPY_IND( v0, v1 )
|
||||
#define VERT_SAVE_IND( idx )
|
||||
#define VERT_RESTORE_IND( idx )
|
||||
#define VERT_SAVE_IND( idx )
|
||||
#define VERT_RESTORE_IND( idx )
|
||||
#endif
|
||||
|
||||
#if !HAVE_SPEC
|
||||
#define VERT_SET_SPEC( v, c )
|
||||
#define VERT_SET_SPEC( v, c )
|
||||
#define VERT_COPY_SPEC( v0, v1 )
|
||||
#define VERT_SAVE_SPEC( idx )
|
||||
#define VERT_RESTORE_SPEC( idx )
|
||||
#define VERT_SAVE_SPEC( idx )
|
||||
#define VERT_RESTORE_SPEC( idx )
|
||||
#endif
|
||||
|
||||
static void TAG(unfilled_tri)( GLcontext *ctx,
|
||||
static void TAG(unfilled_tri)( GLcontext *ctx,
|
||||
GLenum mode,
|
||||
GLuint e0, GLuint e1, GLuint e2 )
|
||||
{
|
||||
|
|
@ -31,7 +60,7 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
|
|||
VERT_SAVE_RGBA(1);
|
||||
VERT_COPY_RGBA(v[0], v[2]);
|
||||
VERT_COPY_RGBA(v[1], v[2]);
|
||||
|
||||
|
||||
if (HAVE_SPEC) {
|
||||
VERT_SAVE_SPEC(0);
|
||||
VERT_SAVE_SPEC(1);
|
||||
|
|
@ -48,21 +77,21 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
|
|||
|
||||
if (mode == GL_POINT) {
|
||||
RASTERIZE(GL_POINTS);
|
||||
if (ef[e0]) POINT( v[0] );
|
||||
if (ef[e1]) POINT( v[1] );
|
||||
if (ef[e2]) POINT( v[2] );
|
||||
if (ef[e0]) POINT( v[0] );
|
||||
if (ef[e1]) POINT( v[1] );
|
||||
if (ef[e2]) POINT( v[2] );
|
||||
}
|
||||
else {
|
||||
RASTERIZE(GL_LINES);
|
||||
if (RENDER_PRIMITIVE == GL_POLYGON) {
|
||||
if (ef[e2]) LINE( v[2], v[0] );
|
||||
if (ef[e0]) LINE( v[0], v[1] );
|
||||
if (ef[e1]) LINE( v[1], v[2] );
|
||||
}
|
||||
if (ef[e2]) LINE( v[2], v[0] );
|
||||
if (ef[e0]) LINE( v[0], v[1] );
|
||||
if (ef[e1]) LINE( v[1], v[2] );
|
||||
}
|
||||
else {
|
||||
if (ef[e0]) LINE( v[0], v[1] );
|
||||
if (ef[e1]) LINE( v[1], v[2] );
|
||||
if (ef[e2]) LINE( v[2], v[0] );
|
||||
if (ef[e0]) LINE( v[0], v[1] );
|
||||
if (ef[e1]) LINE( v[1], v[2] );
|
||||
if (ef[e2]) LINE( v[2], v[0] );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -70,7 +99,7 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
|
|||
if (HAVE_RGBA) {
|
||||
VERT_RESTORE_RGBA(0);
|
||||
VERT_RESTORE_RGBA(1);
|
||||
|
||||
|
||||
if (HAVE_SPEC) {
|
||||
VERT_RESTORE_SPEC(0);
|
||||
VERT_RESTORE_SPEC(1);
|
||||
|
|
@ -83,9 +112,9 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
|
|||
}
|
||||
|
||||
|
||||
static void TAG(unfilled_quad)( GLcontext *ctx,
|
||||
static void TAG(unfilled_quad)( GLcontext *ctx,
|
||||
GLenum mode,
|
||||
GLuint e0, GLuint e1,
|
||||
GLuint e0, GLuint e1,
|
||||
GLuint e2, GLuint e3 )
|
||||
{
|
||||
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
|
||||
|
|
@ -109,7 +138,7 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
|
|||
VERT_COPY_RGBA(v[0], v[3]);
|
||||
VERT_COPY_RGBA(v[1], v[3]);
|
||||
VERT_COPY_RGBA(v[2], v[3]);
|
||||
|
||||
|
||||
if (HAVE_SPEC) {
|
||||
VERT_SAVE_SPEC(0);
|
||||
VERT_SAVE_SPEC(1);
|
||||
|
|
@ -130,17 +159,17 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
|
|||
|
||||
if (mode == GL_POINT) {
|
||||
RASTERIZE(GL_POINTS);
|
||||
if (ef[e0]) POINT( v[0] );
|
||||
if (ef[e1]) POINT( v[1] );
|
||||
if (ef[e2]) POINT( v[2] );
|
||||
if (ef[e3]) POINT( v[3] );
|
||||
if (ef[e0]) POINT( v[0] );
|
||||
if (ef[e1]) POINT( v[1] );
|
||||
if (ef[e2]) POINT( v[2] );
|
||||
if (ef[e3]) POINT( v[3] );
|
||||
}
|
||||
else {
|
||||
RASTERIZE(GL_LINES);
|
||||
if (ef[e0]) LINE( v[0], v[1] );
|
||||
if (ef[e1]) LINE( v[1], v[2] );
|
||||
if (ef[e2]) LINE( v[2], v[3] );
|
||||
if (ef[e3]) LINE( v[3], v[0] );
|
||||
if (ef[e0]) LINE( v[0], v[1] );
|
||||
if (ef[e1]) LINE( v[1], v[2] );
|
||||
if (ef[e2]) LINE( v[2], v[3] );
|
||||
if (ef[e3]) LINE( v[3], v[0] );
|
||||
}
|
||||
|
||||
if ((ctx->_TriangleCaps & DD_FLATSHADE) && HAVE_HW_FLATSHADE) {
|
||||
|
|
@ -148,7 +177,7 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
|
|||
VERT_RESTORE_RGBA(0);
|
||||
VERT_RESTORE_RGBA(1);
|
||||
VERT_RESTORE_RGBA(2);
|
||||
|
||||
|
||||
if (HAVE_SPEC) {
|
||||
VERT_RESTORE_SPEC(0);
|
||||
VERT_RESTORE_SPEC(1);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
/* $Id: t_dd_vb.c,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -21,8 +23,8 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
#if (HAVE_HW_VIEWPORT)
|
||||
|
|
@ -65,8 +67,8 @@ static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc )
|
|||
}
|
||||
|
||||
|
||||
void TAG(translate_vertex)(GLcontext *ctx,
|
||||
const VERTEX *src,
|
||||
void TAG(translate_vertex)(GLcontext *ctx,
|
||||
const VERTEX *src,
|
||||
SWvertex *dst)
|
||||
{
|
||||
GLuint format = GET_VERTEX_FORMAT();
|
||||
|
|
@ -90,7 +92,7 @@ void TAG(translate_vertex)(GLcontext *ctx,
|
|||
dst->color[1] = src->tv.color.green;
|
||||
dst->color[2] = src->tv.color.blue;
|
||||
dst->color[3] = src->tv.color.alpha;
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLfloat oow = (HAVE_HW_DIVIDE) ? 1.0 / src->v.w : src->v.w;
|
||||
|
||||
|
|
@ -121,10 +123,10 @@ void TAG(translate_vertex)(GLcontext *ctx,
|
|||
dst->specular[0] = src->v.specular.red;
|
||||
dst->specular[1] = src->v.specular.green;
|
||||
dst->specular[2] = src->v.specular.blue;
|
||||
|
||||
|
||||
dst->fog = src->v.color.alpha/255.0;
|
||||
|
||||
if (HAVE_PTEX_VERTICES &&
|
||||
if (HAVE_PTEX_VERTICES &&
|
||||
((HAVE_TEX2_VERTICES && format == PROJ_TEX3_VERTEX_FORMAT) ||
|
||||
(format == PROJ_TEX1_VERTEX_FORMAT))) {
|
||||
|
||||
|
|
@ -175,7 +177,7 @@ void TAG(translate_vertex)(GLcontext *ctx,
|
|||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
static void
|
||||
mga_translate_vertex( GLcontext *ctx, const mgaVertex *src, SWvertex *dst)
|
||||
{
|
||||
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
|
||||
|
|
@ -184,7 +186,7 @@ mga_translate_vertex( GLcontext *ctx, const mgaVertex *src, SWvertex *dst)
|
|||
dst->win[1] = - src->v.y + mmesa->driDrawable->h + mmesa->drawY + SUBPIXEL_Y;
|
||||
dst->win[2] = src->v.z / mmesa->depth_scale;
|
||||
dst->win[3] = src->v.oow;
|
||||
|
||||
|
||||
dst->color[0] = src->v.color.red;
|
||||
dst->color[1] = src->v.color.green;
|
||||
dst->color[2] = src->v.color.blue;
|
||||
|
|
@ -215,22 +217,22 @@ void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v )
|
|||
|
||||
if (format == TINY_VERTEX_FORMAT) {
|
||||
fprintf(stderr, "x %f y %f z %f\n", v->v.x, v->v.y, v->v.z);
|
||||
fprintf(stderr, "r %d g %d b %d a %d\n",
|
||||
fprintf(stderr, "r %d g %d b %d a %d\n",
|
||||
v->tv.color.red,
|
||||
v->tv.color.green,
|
||||
v->tv.color.blue,
|
||||
v->tv.color.alpha);
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "x %f y %f z %f oow %f\n",
|
||||
fprintf(stderr, "x %f y %f z %f oow %f\n",
|
||||
v->v.x, v->v.y, v->v.z, v->v.w);
|
||||
fprintf(stderr, "r %d g %d b %d a %d\n",
|
||||
fprintf(stderr, "r %d g %d b %d a %d\n",
|
||||
v->v.color.red,
|
||||
v->v.color.green,
|
||||
v->v.color.blue,
|
||||
v->v.color.alpha);
|
||||
}
|
||||
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
/* $Id: t_dd_vbtmp.h,v 1.8 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -21,8 +23,8 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -58,7 +60,7 @@
|
|||
* unsigned int ui[16];
|
||||
* unsigned char ub4[4][16];
|
||||
* }
|
||||
*
|
||||
*
|
||||
|
||||
* DO_XYZW: Emit xyz and maybe w coordinates.
|
||||
* DO_RGBA: Emit color.
|
||||
|
|
@ -74,7 +76,7 @@
|
|||
*
|
||||
* HAVE_HW_VIEWPORT: Hardware performs viewport transform.
|
||||
* HAVE_HW_DIVIDE: Hardware performs perspective divide.
|
||||
*
|
||||
*
|
||||
* HAVE_TINY_VERTICES: Hardware understands v.tv format.
|
||||
* HAVE_PTEX_VERTICES: Hardware understands v.pv format.
|
||||
* HAVE_NOTEX_VERTICES: Hardware understands v.v format with texcount 0.
|
||||
|
|
@ -186,7 +188,7 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
if (VB->TexCoordPtr[t0]) {
|
||||
tc0_stride = VB->TexCoordPtr[t0]->stride;
|
||||
tc0 = VB->TexCoordPtr[t0]->data;
|
||||
if (DO_PTEX)
|
||||
if (DO_PTEX)
|
||||
tc0_size = VB->TexCoordPtr[t0]->size;
|
||||
}
|
||||
else {
|
||||
|
|
@ -228,21 +230,21 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
if (DO_TEX3)
|
||||
if (tc3)
|
||||
tc3 = (GLfloat (*)[4])((GLubyte *)tc3 + start * tc3_stride);
|
||||
if (DO_RGBA)
|
||||
if (DO_RGBA)
|
||||
STRIDE_4UB(col, start * col_stride);
|
||||
if (DO_SPEC)
|
||||
if (DO_SPEC)
|
||||
STRIDE_4UB(spec, start * spec_stride);
|
||||
if (DO_FOG)
|
||||
if (DO_FOG)
|
||||
STRIDE_F(fog, start * fog_stride);
|
||||
}
|
||||
|
||||
for (i=start; i < end; i++, v = (VERTEX *)((GLubyte *)v + stride)) {
|
||||
if (DO_XYZW) {
|
||||
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
|
||||
VIEWPORT_X(v->v.x, coord[0][0]);
|
||||
VIEWPORT_Y(v->v.y, coord[0][1]);
|
||||
VIEWPORT_Z(v->v.z, coord[0][2]);
|
||||
v->v.w = coord[0][3];
|
||||
VIEWPORT_X(v->v.x, coord[0][0]);
|
||||
VIEWPORT_Y(v->v.y, coord[0][1]);
|
||||
VIEWPORT_Z(v->v.z, coord[0][2]);
|
||||
v->v.w = coord[0][3];
|
||||
}
|
||||
coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride);
|
||||
}
|
||||
|
|
@ -274,18 +276,18 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
v->v.v0 = tc0[0][1];
|
||||
if (DO_PTEX) {
|
||||
if (HAVE_PTEX_VERTICES) {
|
||||
if (tc0_size == 4)
|
||||
if (tc0_size == 4)
|
||||
v->pv.q0 = tc0[0][3];
|
||||
else
|
||||
v->pv.q0 = 1.0;
|
||||
}
|
||||
}
|
||||
else if (tc0_size == 4) {
|
||||
float rhw = 1.0 / tc0[0][3];
|
||||
v->v.w *= tc0[0][3];
|
||||
v->v.u0 *= rhw;
|
||||
v->v.v0 *= rhw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + tc0_stride);
|
||||
}
|
||||
}
|
||||
|
|
@ -294,18 +296,18 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
if (DO_PTEX) {
|
||||
v->pv.u1 = tc1[0][0];
|
||||
v->pv.v1 = tc1[0][1];
|
||||
if (tc1_size == 4)
|
||||
if (tc1_size == 4)
|
||||
v->pv.q1 = tc1[0][3];
|
||||
else
|
||||
v->pv.q1 = 1.0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
v->v.u1 = tc1[0][0];
|
||||
v->v.v1 = tc1[0][1];
|
||||
}
|
||||
tc1 = (GLfloat (*)[4])((GLubyte *)tc1 + tc1_stride);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (DO_PTEX) {
|
||||
*(GLuint *)&v->pv.q1 = 0; /* avoid culling on radeon */
|
||||
}
|
||||
|
|
@ -314,45 +316,45 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
if (DO_PTEX) {
|
||||
v->pv.u2 = tc2[0][0];
|
||||
v->pv.v2 = tc2[0][1];
|
||||
if (tc2_size == 4)
|
||||
if (tc2_size == 4)
|
||||
v->pv.q2 = tc2[0][3];
|
||||
else
|
||||
v->pv.q2 = 1.0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
v->v.u2 = tc2[0][0];
|
||||
v->v.v2 = tc2[0][1];
|
||||
}
|
||||
tc2 = (GLfloat (*)[4])((GLubyte *)tc2 + tc2_stride);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (DO_TEX3) {
|
||||
if (tc3) {
|
||||
if (DO_PTEX) {
|
||||
v->pv.u3 = tc3[0][0];
|
||||
v->pv.v3 = tc3[0][1];
|
||||
if (tc3_size == 4)
|
||||
if (tc3_size == 4)
|
||||
v->pv.q3 = tc3[0][3];
|
||||
else
|
||||
v->pv.q3 = 1.0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
v->v.u3 = tc3[0][0];
|
||||
v->v.v3 = tc3[0][1];
|
||||
}
|
||||
tc3 = (GLfloat (*)[4])((GLubyte *)tc3 + tc3_stride);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (i=start; i < end; i++, v = (VERTEX *)((GLubyte *)v + stride)) {
|
||||
if (DO_XYZW) {
|
||||
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
|
||||
VIEWPORT_X(v->v.x, coord[i][0]);
|
||||
VIEWPORT_Y(v->v.y, coord[i][1]);
|
||||
VIEWPORT_Z(v->v.z, coord[i][2]);
|
||||
v->v.w = coord[i][3];
|
||||
VIEWPORT_X(v->v.x, coord[i][0]);
|
||||
VIEWPORT_Y(v->v.y, coord[i][1]);
|
||||
VIEWPORT_Z(v->v.z, coord[i][2]);
|
||||
v->v.w = coord[i][3];
|
||||
}
|
||||
}
|
||||
if (DO_RGBA) {
|
||||
|
|
@ -380,20 +382,20 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
v->pv.u0 = tc0[i][0];
|
||||
v->pv.v0 = tc0[i][1];
|
||||
if (HAVE_PTEX_VERTICES) {
|
||||
if (tc0_size == 4)
|
||||
if (tc0_size == 4)
|
||||
v->pv.q0 = tc0[i][3];
|
||||
else
|
||||
v->pv.q0 = 1.0;
|
||||
|
||||
v->pv.q1 = 0; /* radeon */
|
||||
}
|
||||
}
|
||||
else if (tc0_size == 4) {
|
||||
float rhw = 1.0 / tc0[i][3];
|
||||
v->v.w *= tc0[i][3];
|
||||
v->v.u0 *= rhw;
|
||||
v->v.v0 *= rhw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
v->v.u0 = tc0[i][0];
|
||||
v->v.v0 = tc0[i][1];
|
||||
|
|
@ -405,11 +407,11 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
if (DO_PTEX) {
|
||||
v->pv.u1 = tc1[i][0];
|
||||
v->pv.v1 = tc1[i][1];
|
||||
if (tc1_size == 4)
|
||||
if (tc1_size == 4)
|
||||
v->pv.q1 = tc1[i][3];
|
||||
else
|
||||
v->pv.q1 = 1.0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
v->v.u1 = tc1[i][0];
|
||||
v->v.v1 = tc1[i][1];
|
||||
|
|
@ -419,7 +421,7 @@ static void TAG(emit)( GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else
|
||||
#if DO_XYZW
|
||||
|
||||
#if HAVE_HW_DIVIDE
|
||||
|
|
@ -432,7 +434,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
|
|||
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
|
||||
GLubyte (*col)[4] = VB->ColorPtr[0]->data;
|
||||
GLuint col_stride = VB->ColorPtr[0]->stride;
|
||||
GLfloat (*coord)[4] = VB->ProjectedClipPtr->data;
|
||||
GLfloat (*coord)[4] = VB->ProjectedClipPtr->data;
|
||||
GLuint coord_stride = VB->ProjectedClipPtr->stride;
|
||||
GLfloat *v = (GLfloat *)dest;
|
||||
const GLubyte *mask = VB->ClipMask;
|
||||
|
|
@ -444,7 +446,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
|
|||
ASSERT(stride == 4);
|
||||
|
||||
/* Pack what's left into a 4-dword vertex. Color is in a different
|
||||
* place, and there is no 'w' coordinate.
|
||||
* place, and there is no 'w' coordinate.
|
||||
*/
|
||||
if (VB->importable_data) {
|
||||
if (start) {
|
||||
|
|
@ -454,15 +456,15 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
|
|||
|
||||
for (i=start; i < end; i++, v+=4) {
|
||||
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
|
||||
VIEWPORT_X(v[0], coord[0][0]);
|
||||
VIEWPORT_Y(v[1], coord[0][1]);
|
||||
VIEWPORT_Z(v[2], coord[0][2]);
|
||||
VIEWPORT_X(v[0], coord[0][0]);
|
||||
VIEWPORT_Y(v[1], coord[0][1]);
|
||||
VIEWPORT_Z(v[2], coord[0][2]);
|
||||
}
|
||||
coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride);
|
||||
if (DO_RGBA) {
|
||||
if (HAVE_RGBA_COLOR) {
|
||||
*(GLuint *)&v[3] = *(GLuint *)col;
|
||||
}
|
||||
}
|
||||
else {
|
||||
GLubyte *b = (GLubyte *)&v[3];
|
||||
b[0] = col[0][2];
|
||||
|
|
@ -477,9 +479,9 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
|
|||
else {
|
||||
for (i=start; i < end; i++, v+=4) {
|
||||
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
|
||||
VIEWPORT_X(v[0], coord[i][0]);
|
||||
VIEWPORT_Y(v[1], coord[i][1]);
|
||||
VIEWPORT_Z(v[2], coord[i][2]);
|
||||
VIEWPORT_X(v[0], coord[i][0]);
|
||||
VIEWPORT_Y(v[1], coord[i][1]);
|
||||
VIEWPORT_Z(v[2], coord[i][2]);
|
||||
}
|
||||
if (DO_RGBA) {
|
||||
if (HAVE_RGBA_COLOR) {
|
||||
|
|
@ -551,13 +553,13 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
|
|||
|
||||
if (DO_PTEX)
|
||||
return GL_TRUE;
|
||||
|
||||
|
||||
if ((DO_TEX3 && VB->TexCoordPtr[3]->size == 4) ||
|
||||
(DO_TEX2 && VB->TexCoordPtr[2]->size == 4) ||
|
||||
(DO_TEX1 && VB->TexCoordPtr[1]->size == 4) ||
|
||||
(DO_TEX0 && VB->TexCoordPtr[0]->size == 4))
|
||||
return GL_FALSE;
|
||||
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
#else
|
||||
|
|
@ -574,11 +576,11 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
|
|||
if (DO_TEX1 && VB->TexCoordPtr[0] == 0)
|
||||
VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
|
||||
|
||||
if (DO_PTEX)
|
||||
if (DO_PTEX)
|
||||
return GL_TRUE;
|
||||
|
||||
|
||||
/* No hardware support for projective texture. Can fake it for
|
||||
* TEX0 only.
|
||||
* TEX0 only.
|
||||
*/
|
||||
if ((DO_TEX3 && VB->TexCoordPtr[3]->size == 4) ||
|
||||
(DO_TEX2 && VB->TexCoordPtr[2]->size == 4) ||
|
||||
|
|
@ -600,7 +602,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
|
|||
|
||||
|
||||
static void TAG(interp)( GLcontext *ctx,
|
||||
GLfloat t,
|
||||
GLfloat t,
|
||||
GLuint edst, GLuint eout, GLuint ein,
|
||||
GLboolean force_boundary )
|
||||
{
|
||||
|
|
@ -617,25 +619,25 @@ static void TAG(interp)( GLcontext *ctx,
|
|||
|
||||
(void)s;
|
||||
|
||||
|
||||
|
||||
if (!HAVE_HW_DIVIDE) {
|
||||
w = 1.0 / dstclip[3];
|
||||
VIEWPORT_X( dst->v.x, dstclip[0] * w );
|
||||
VIEWPORT_Y( dst->v.y, dstclip[1] * w );
|
||||
VIEWPORT_Z( dst->v.z, dstclip[2] * w );
|
||||
}
|
||||
VIEWPORT_X( dst->v.x, dstclip[0] * w );
|
||||
VIEWPORT_Y( dst->v.y, dstclip[1] * w );
|
||||
VIEWPORT_Z( dst->v.z, dstclip[2] * w );
|
||||
}
|
||||
else {
|
||||
VIEWPORT_X( dst->v.x, dstclip[0] );
|
||||
VIEWPORT_Y( dst->v.y, dstclip[1] );
|
||||
VIEWPORT_Z( dst->v.z, dstclip[2] );
|
||||
w = dstclip[3];
|
||||
VIEWPORT_X( dst->v.x, dstclip[0] );
|
||||
VIEWPORT_Y( dst->v.y, dstclip[1] );
|
||||
VIEWPORT_Z( dst->v.z, dstclip[2] );
|
||||
w = dstclip[3];
|
||||
}
|
||||
|
||||
if (HAVE_HW_DIVIDE || DO_FOG || DO_SPEC || DO_TEX0 || DO_TEX1 ||
|
||||
if (HAVE_HW_DIVIDE || DO_FOG || DO_SPEC || DO_TEX0 || DO_TEX1 ||
|
||||
DO_TEX2 || DO_TEX3) {
|
||||
|
||||
dst->v.w = w;
|
||||
|
||||
dst->v.w = w;
|
||||
|
||||
INTERP_UB( t, dst->ub4[4][0], out->ub4[4][0], in->ub4[4][0] );
|
||||
INTERP_UB( t, dst->ub4[4][1], out->ub4[4][1], in->ub4[4][1] );
|
||||
INTERP_UB( t, dst->ub4[4][2], out->ub4[4][2], in->ub4[4][2] );
|
||||
|
|
@ -663,17 +665,17 @@ static void TAG(interp)( GLcontext *ctx,
|
|||
GLfloat qdst, rqdst;
|
||||
|
||||
ASSERT( !HAVE_HW_DIVIDE );
|
||||
|
||||
|
||||
INTERP_F( t, dst->v.u0, out->v.u0 * qout, in->v.u0 * qin );
|
||||
INTERP_F( t, dst->v.v0, out->v.v0 * qout, in->v.v0 * qin );
|
||||
INTERP_F( t, qdst, qout, qin );
|
||||
|
||||
|
||||
rqdst = 1.0 / qdst;
|
||||
dst->v.u0 *= rqdst;
|
||||
dst->v.v0 *= rqdst;
|
||||
dst->v.w *= rqdst;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
INTERP_F( t, dst->v.u0, out->v.u0, in->v.u0 );
|
||||
INTERP_F( t, dst->v.v0, out->v.v0, in->v.v0 );
|
||||
|
|
@ -728,12 +730,12 @@ static void TAG(interp)( GLcontext *ctx,
|
|||
static void TAG(init)( void )
|
||||
{
|
||||
setup_tab[IND].emit = TAG(emit);
|
||||
|
||||
|
||||
#if (DO_XYZW && DO_RGBA)
|
||||
setup_tab[IND].check_tex_sizes = TAG(check_tex_sizes);
|
||||
setup_tab[IND].interp = TAG(interp);
|
||||
#endif
|
||||
|
||||
|
||||
if (DO_SPEC)
|
||||
setup_tab[IND].copy_pv = copy_pv_rgba4_spec5;
|
||||
else if (HAVE_HW_DIVIDE || DO_SPEC || DO_FOG || DO_TEX0 || DO_TEX1 ||
|
||||
|
|
@ -747,55 +749,55 @@ static void TAG(init)( void )
|
|||
ASSERT(HAVE_PTEX_VERTICES);
|
||||
setup_tab[IND].vertex_format = PROJ_TEX3_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 18;
|
||||
setup_tab[IND].vertex_stride_shift = 7;
|
||||
setup_tab[IND].vertex_stride_shift = 7;
|
||||
}
|
||||
else {
|
||||
setup_tab[IND].vertex_format = TEX3_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 14;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (DO_TEX2) {
|
||||
if (DO_PTEX) {
|
||||
ASSERT(HAVE_PTEX_VERTICES);
|
||||
setup_tab[IND].vertex_format = PROJ_TEX3_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 18;
|
||||
setup_tab[IND].vertex_stride_shift = 7;
|
||||
setup_tab[IND].vertex_stride_shift = 7;
|
||||
}
|
||||
else {
|
||||
setup_tab[IND].vertex_format = TEX2_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 12;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (DO_TEX1) {
|
||||
if (DO_PTEX) {
|
||||
ASSERT(HAVE_PTEX_VERTICES);
|
||||
setup_tab[IND].vertex_format = PROJ_TEX1_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 12;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
}
|
||||
else {
|
||||
setup_tab[IND].vertex_format = TEX1_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 10;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (DO_TEX0) {
|
||||
if (DO_PTEX && HAVE_PTEX_VERTICES) {
|
||||
setup_tab[IND].vertex_format = PROJ_TEX1_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 12;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
setup_tab[IND].vertex_stride_shift = 6;
|
||||
} else {
|
||||
setup_tab[IND].vertex_format = TEX0_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 8;
|
||||
setup_tab[IND].vertex_stride_shift = 5;
|
||||
setup_tab[IND].vertex_stride_shift = 5;
|
||||
}
|
||||
}
|
||||
else if (!HAVE_HW_DIVIDE && !DO_SPEC && !DO_FOG && HAVE_TINY_VERTICES) {
|
||||
setup_tab[IND].vertex_format = TINY_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 4;
|
||||
setup_tab[IND].vertex_stride_shift = 4;
|
||||
setup_tab[IND].vertex_stride_shift = 4;
|
||||
} else if (HAVE_NOTEX_VERTICES) {
|
||||
setup_tab[IND].vertex_format = NOTEX_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 6;
|
||||
|
|
@ -803,7 +805,7 @@ static void TAG(init)( void )
|
|||
} else {
|
||||
setup_tab[IND].vertex_format = TEX0_VERTEX_FORMAT;
|
||||
setup_tab[IND].vertex_size = 8;
|
||||
setup_tab[IND].vertex_stride_shift = 5;
|
||||
setup_tab[IND].vertex_stride_shift = 5;
|
||||
}
|
||||
|
||||
assert(setup_tab[IND].vertex_size * 4 <=
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
/* $Id: t_dd_vertex.h,v 1.5 2001/03/12 00:48:44 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -21,8 +23,8 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
#ifdef COLOR_IS_RGBA
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: glapi.c,v 1.50 2001/03/07 05:06:11 brianp Exp $ */
|
||||
/* $Id: glapi.c,v 1.51 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -1912,7 +1912,3 @@ _glapi_check_table(const struct _glapi_table *table)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: glapitemp.h,v 1.24 2000/12/26 05:09:28 keithw Exp $ */
|
||||
/* $Id: glapitemp.h,v 1.25 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -3011,7 +3011,7 @@ KEYWORD1 void KEYWORD2 NAME(TexCoord4fv)(const GLfloat *v)
|
|||
{
|
||||
DISPATCH(TexCoord4fv, (v), (F, ";"));
|
||||
}
|
||||
|
||||
|
||||
KEYWORD1 void KEYWORD2 NAME(TexCoord4iv)(const GLint *v)
|
||||
{
|
||||
DISPATCH(TexCoord4iv, (v), (F, ";"));
|
||||
|
|
@ -3426,7 +3426,7 @@ KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort *v
|
|||
|
||||
#ifdef DO_INIT
|
||||
|
||||
static void NAME(InitDispatch)( void )
|
||||
static void NAME(InitDispatch)( void )
|
||||
{
|
||||
INITARGS;
|
||||
INIT(GetCompressedTexImageARB);
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: glthread.c,v 1.7 2001/03/07 05:06:11 brianp Exp $ */
|
||||
/* $Id: glthread.c,v 1.8 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
#include "all.h"
|
||||
#else
|
||||
#include "glheader.h"
|
||||
#include "glthread.h"
|
||||
#include "glthread.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -117,9 +117,9 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
|
|||
|
||||
|
||||
/*
|
||||
* Solaris/Unix International Threads -- Use only if POSIX threads
|
||||
* Solaris/Unix International Threads -- Use only if POSIX threads
|
||||
* aren't available on your Unix platform. Solaris 2.[34] are examples
|
||||
* of platforms where this is the case. Be sure to use -mt and/or
|
||||
* of platforms where this is the case. Be sure to use -mt and/or
|
||||
* -D_REENTRANT when compiling.
|
||||
*/
|
||||
#ifdef SOLARIS_THREADS
|
||||
|
|
@ -156,7 +156,7 @@ _glthread_GetTSD(_glthread_TSD *tsd)
|
|||
#ifdef USE_LOCK_FOR_KEY
|
||||
mutex_lock(&tsd->keylock);
|
||||
thr_getspecific(tsd->key, &ret);
|
||||
mutex_unlock(&tsd->keylock);
|
||||
mutex_unlock(&tsd->keylock);
|
||||
#else
|
||||
if ((errno = thr_getspecific(tsd->key, &ret)) != 0) {
|
||||
perror(GET_TSD_ERROR);
|
||||
|
|
@ -188,7 +188,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
|
|||
* Win32 Threads. The only available option for Windows 95/NT.
|
||||
* Be sure that you compile using the Multithreaded runtime, otherwise
|
||||
* bad things will happen.
|
||||
*/
|
||||
*/
|
||||
#ifdef WIN32_THREADS
|
||||
|
||||
unsigned long
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: glthread.h,v 1.7 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: glthread.h,v 1.8 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -249,4 +249,3 @@ _glthread_SetTSD(_glthread_TSD *, void *);
|
|||
|
||||
|
||||
#endif /* THREADS_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: accum.c,v 1.36 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: accum.c,v 1.37 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: accum.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: accum.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.1
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,29 @@
|
|||
/* $Id: api_arrayelt.c,v 1.2 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "glheader.h"
|
||||
#include "api_noop.h"
|
||||
#include "context.h"
|
||||
|
|
@ -13,7 +39,7 @@ typedef struct {
|
|||
struct gl_client_array *array;
|
||||
void *func;
|
||||
} AAtexarray;
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
struct gl_client_array *array;
|
||||
|
|
@ -170,7 +196,7 @@ static void _aa_update_state( GLcontext *ctx )
|
|||
AAarray *aa = actx->arrays;
|
||||
int i;
|
||||
|
||||
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
|
||||
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
|
||||
if (ctx->Array.TexCoord[i].Enabled) {
|
||||
ta->unit = i;
|
||||
ta->array = &ctx->Array.TexCoord[i];
|
||||
|
|
@ -237,14 +263,14 @@ static void _aa_loopback_array_elt( GLint elt )
|
|||
AAarray *aa;
|
||||
|
||||
for (ta = actx->texarrays ; ta->func ; ta++) {
|
||||
void (*func)( GLint, const void * ) =
|
||||
(void (*)( GLint, const void * )) ta->func;
|
||||
void (*func)( GLint, const void * ) =
|
||||
(void (*)( GLint, const void * )) ta->func;
|
||||
func( ta->unit, (char *)ta->array->Ptr + elt * ta->array->SizeB );
|
||||
}
|
||||
|
||||
for (aa = actx->arrays ; aa->func ; aa++) {
|
||||
void (*func)( GLint, const void * ) =
|
||||
(void (*)( GLint, const void * )) aa->func;
|
||||
void (*func)( GLint, const void * ) =
|
||||
(void (*)( GLint, const void * )) aa->func;
|
||||
func( (char *)aa->array->Ptr + elt * aa->array->SizeB );
|
||||
}
|
||||
}
|
||||
|
|
@ -254,8 +280,8 @@ void _aa_exec_array_elt( GLint elt )
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
AAcontext *actx = AA_CONTEXT(ctx);
|
||||
|
||||
if (actx->NewState)
|
||||
|
||||
if (actx->NewState)
|
||||
_aa_update_state( ctx );
|
||||
|
||||
ctx->Exec->ArrayElement = _aa_loopback_array_elt;
|
||||
|
|
@ -268,8 +294,8 @@ void _aa_save_array_elt( GLint elt )
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
AAcontext *actx = AA_CONTEXT(ctx);
|
||||
|
||||
if (actx->NewState)
|
||||
|
||||
if (actx->NewState)
|
||||
_aa_update_state( ctx );
|
||||
|
||||
ctx->Save->ArrayElement = _aa_loopback_array_elt;
|
||||
|
|
@ -279,6 +305,6 @@ void _aa_save_array_elt( GLint elt )
|
|||
|
||||
void aa_invalidate_state( GLcontext *ctx, GLuint new_state )
|
||||
{
|
||||
if (AA_CONTEXT(ctx))
|
||||
if (AA_CONTEXT(ctx))
|
||||
AA_CONTEXT(ctx)->NewState |= new_state;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,30 @@
|
|||
/* $Id: api_loopback.c,v 1.6 2001/01/02 22:05:55 brianp Exp $ */
|
||||
/* $Id: api_loopback.c,v 1.7 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -57,10 +55,10 @@
|
|||
#define TEXCOORD2(s,t) DRIVER(TexCoord2f)(s,t)
|
||||
#define TEXCOORD3(s,t,u) DRIVER(TexCoord3f)(s,t,u)
|
||||
#define TEXCOORD4(s,t,u,v) DRIVER(TexCoord4f)(s,t,u,v)
|
||||
#define INDEX(c) DRIVER(Indexi)(c)
|
||||
#define MULTI_TEXCOORD1(z,s) DRIVER(MultiTexCoord1fARB)(z,s)
|
||||
#define INDEX(c) DRIVER(Indexi)(c)
|
||||
#define MULTI_TEXCOORD1(z,s) DRIVER(MultiTexCoord1fARB)(z,s)
|
||||
#define MULTI_TEXCOORD2(z,s,t) DRIVER(MultiTexCoord2fARB)(z,s,t)
|
||||
#define MULTI_TEXCOORD3(z,s,t,u) DRIVER(MultiTexCoord3fARB)(z,s,t,u)
|
||||
#define MULTI_TEXCOORD3(z,s,t,u) DRIVER(MultiTexCoord3fARB)(z,s,t,u)
|
||||
#define MULTI_TEXCOORD4(z,s,t,u,v) DRIVER(MultiTexCoord4fARB)(z,s,t,u,v)
|
||||
#define EVALCOORD1(x) DRIVER(EvalCoord1f)(x)
|
||||
#define EVALCOORD2(x,y) DRIVER(EvalCoord2f)(x,y)
|
||||
|
|
@ -177,7 +175,7 @@ loopback_Color4i( GLint red, GLint green, GLint blue, GLint alpha )
|
|||
}
|
||||
|
||||
static void
|
||||
loopback_Color4s( GLshort red, GLshort green, GLshort blue,
|
||||
loopback_Color4s( GLshort red, GLshort green, GLshort blue,
|
||||
GLshort alpha )
|
||||
{
|
||||
GLubyte col[4];
|
||||
|
|
@ -200,7 +198,7 @@ loopback_Color4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha )
|
|||
}
|
||||
|
||||
static void
|
||||
loopback_Color4us( GLushort red, GLushort green, GLushort blue,
|
||||
loopback_Color4us( GLushort red, GLushort green, GLushort blue,
|
||||
GLushort alpha )
|
||||
{
|
||||
GLubyte col[4];
|
||||
|
|
@ -249,7 +247,7 @@ loopback_Color3iv( const GLint *v )
|
|||
|
||||
static void
|
||||
loopback_Color3sv( const GLshort *v )
|
||||
{
|
||||
{
|
||||
GLubyte col[4];
|
||||
col[0] = SHORT_TO_UBYTE(v[0]);
|
||||
col[1] = SHORT_TO_UBYTE(v[1]);
|
||||
|
|
@ -354,9 +352,9 @@ loopback_Color4usv( const GLushort *v)
|
|||
static void
|
||||
loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue )
|
||||
{
|
||||
COLORF( BYTE_TO_FLOAT(red),
|
||||
COLORF( BYTE_TO_FLOAT(red),
|
||||
BYTE_TO_FLOAT(green),
|
||||
BYTE_TO_FLOAT(blue),
|
||||
BYTE_TO_FLOAT(blue),
|
||||
1.0 );
|
||||
}
|
||||
|
||||
|
|
@ -438,7 +436,7 @@ loopback_Color3usv_f( const GLushort *v )
|
|||
|
||||
|
||||
static void
|
||||
loopback_Color4b_f( GLbyte red, GLbyte green, GLbyte blue,
|
||||
loopback_Color4b_f( GLbyte red, GLbyte green, GLbyte blue,
|
||||
GLbyte alpha )
|
||||
{
|
||||
COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
|
||||
|
|
@ -460,7 +458,7 @@ loopback_Color4i_f( GLint red, GLint green, GLint blue, GLint alpha )
|
|||
}
|
||||
|
||||
static void
|
||||
loopback_Color4s_f( GLshort red, GLshort green, GLshort blue,
|
||||
loopback_Color4s_f( GLshort red, GLshort green, GLshort blue,
|
||||
GLshort alpha )
|
||||
{
|
||||
COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
|
||||
|
|
@ -878,21 +876,21 @@ loopback_Vertex3sv( const GLshort *v )
|
|||
static void
|
||||
loopback_Vertex4dv( const GLdouble *v )
|
||||
{
|
||||
VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
|
||||
VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
|
||||
(GLfloat) v[2], (GLfloat) v[3] );
|
||||
}
|
||||
|
||||
static void
|
||||
loopback_Vertex4iv( const GLint *v )
|
||||
{
|
||||
VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
|
||||
VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
|
||||
(GLfloat) v[2], (GLfloat) v[3] );
|
||||
}
|
||||
|
||||
static void
|
||||
loopback_Vertex4sv( const GLshort *v )
|
||||
{
|
||||
VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
|
||||
VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
|
||||
(GLfloat) v[2], (GLfloat) v[3] );
|
||||
}
|
||||
|
||||
|
|
@ -1365,7 +1363,7 @@ loopback_SecondaryColor3usvEXT_f( const GLushort *v )
|
|||
|
||||
|
||||
void
|
||||
_mesa_loopback_prefer_float( struct _glapi_table *dest,
|
||||
_mesa_loopback_prefer_float( struct _glapi_table *dest,
|
||||
GLboolean prefer_float_colors )
|
||||
{
|
||||
if (!prefer_float_colors) {
|
||||
|
|
@ -1405,7 +1403,7 @@ _mesa_loopback_prefer_float( struct _glapi_table *dest,
|
|||
dest->SecondaryColor3svEXT = loopback_SecondaryColor3svEXT;
|
||||
dest->SecondaryColor3uivEXT = loopback_SecondaryColor3uivEXT;
|
||||
dest->SecondaryColor3usvEXT = loopback_SecondaryColor3usvEXT;
|
||||
}
|
||||
}
|
||||
else {
|
||||
dest->Color3b = loopback_Color3b_f;
|
||||
dest->Color3d = loopback_Color3d_f;
|
||||
|
|
@ -1448,13 +1446,13 @@ _mesa_loopback_prefer_float( struct _glapi_table *dest,
|
|||
|
||||
/* Passing prefer_f_colors as true will mean that all colors
|
||||
* *except* Color{34}ub{v} are passed as floats. Setting it false will
|
||||
* mean all colors *except* Color{34}f{v} are passed as ubytes.
|
||||
*
|
||||
* mean all colors *except* Color{34}f{v} are passed as ubytes.
|
||||
*
|
||||
* This code never registers handlers for any of the entry points
|
||||
* listed in vtxfmt.h.
|
||||
* listed in vtxfmt.h.
|
||||
*/
|
||||
void
|
||||
_mesa_loopback_init_api_table( struct _glapi_table *dest,
|
||||
_mesa_loopback_init_api_table( struct _glapi_table *dest,
|
||||
GLboolean prefer_float_colors )
|
||||
{
|
||||
_mesa_loopback_prefer_float( dest, prefer_float_colors );
|
||||
|
|
|
|||
|
|
@ -1,3 +1,29 @@
|
|||
/* $Id: api_loopback.h,v 1.2 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef API_LOOPBACK_H
|
||||
#define API_LOOPBACK_H
|
||||
|
||||
|
|
@ -5,10 +31,10 @@
|
|||
|
||||
struct _glapi_table;
|
||||
|
||||
extern void _mesa_loopback_prefer_float( struct _glapi_table *dest,
|
||||
extern void _mesa_loopback_prefer_float( struct _glapi_table *dest,
|
||||
GLboolean prefer_float_colors );
|
||||
|
||||
extern void _mesa_loopback_init_api_table( struct _glapi_table *dest,
|
||||
extern void _mesa_loopback_init_api_table( struct _glapi_table *dest,
|
||||
GLboolean prefer_float_colors );
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,3 +1,28 @@
|
|||
/* $Id: api_noop.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _API_NOOP_H
|
||||
#define _API_NOOP_H
|
||||
|
|
@ -52,17 +77,17 @@ extern void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a );
|
|||
|
||||
extern void _mesa_noop_MultiTexCoord1fvARB( GLenum target, GLfloat *v );
|
||||
|
||||
extern void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a,
|
||||
extern void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a,
|
||||
GLfloat b );
|
||||
|
||||
extern void _mesa_noop_MultiTexCoord2fvARB( GLenum target, GLfloat *v );
|
||||
|
||||
extern void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a,
|
||||
extern void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a,
|
||||
GLfloat b, GLfloat c);
|
||||
|
||||
extern void _mesa_noop_MultiTexCoord3fvARB( GLenum target, GLfloat *v );
|
||||
|
||||
extern void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a,
|
||||
extern void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a,
|
||||
GLfloat b, GLfloat c, GLfloat d );
|
||||
|
||||
extern void _mesa_noop_MultiTexCoord4fvARB( GLenum target, GLfloat *v );
|
||||
|
|
@ -94,17 +119,17 @@ extern void _mesa_noop_TexCoord4fv( GLfloat *v );
|
|||
|
||||
/* Not strictly a noop -- translate Rectf down to Begin/End and
|
||||
* vertices. Closer to the loopback operations, but doesn't meet the
|
||||
* criteria for inclusion there (cannot be used in the Save table).
|
||||
* criteria for inclusion there (cannot be used in the Save table).
|
||||
*/
|
||||
extern void _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
|
||||
|
||||
|
||||
extern void _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count);
|
||||
extern void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
|
||||
extern void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
|
||||
const GLvoid *indices);
|
||||
extern void _mesa_noop_DrawRangeElements(GLenum mode,
|
||||
GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
extern void _mesa_noop_DrawRangeElements(GLenum mode,
|
||||
GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
const GLvoid *indices);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
/* $Id: api_validate.c,v 1.4 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: api_validate.c,v 1.5 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -34,10 +33,10 @@
|
|||
|
||||
GLboolean
|
||||
_mesa_validate_DrawElements(GLcontext *ctx,
|
||||
GLenum mode, GLsizei count, GLenum type,
|
||||
GLenum mode, GLsizei count, GLenum type,
|
||||
const GLvoid *indices)
|
||||
{
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
|
||||
if (count <= 0) {
|
||||
if (count < 0)
|
||||
|
|
@ -45,14 +44,14 @@ _mesa_validate_DrawElements(GLcontext *ctx,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (mode < 0 ||
|
||||
if (mode < 0 ||
|
||||
mode > GL_POLYGON) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (type != GL_UNSIGNED_INT &&
|
||||
type != GL_UNSIGNED_BYTE &&
|
||||
if (type != GL_UNSIGNED_INT &&
|
||||
type != GL_UNSIGNED_BYTE &&
|
||||
type != GL_UNSIGNED_SHORT)
|
||||
{
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
|
||||
|
|
@ -70,12 +69,12 @@ _mesa_validate_DrawElements(GLcontext *ctx,
|
|||
|
||||
|
||||
GLboolean
|
||||
_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
|
||||
GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
|
||||
GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
const GLvoid *indices)
|
||||
{
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
|
||||
if (count <= 0) {
|
||||
if (count < 0)
|
||||
|
|
@ -93,8 +92,8 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (type != GL_UNSIGNED_INT &&
|
||||
type != GL_UNSIGNED_BYTE &&
|
||||
if (type != GL_UNSIGNED_INT &&
|
||||
type != GL_UNSIGNED_BYTE &&
|
||||
type != GL_UNSIGNED_SHORT)
|
||||
{
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
|
||||
|
|
@ -113,10 +112,10 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
|
|||
|
||||
|
||||
GLboolean
|
||||
_mesa_validate_DrawArrays(GLcontext *ctx,
|
||||
_mesa_validate_DrawArrays(GLcontext *ctx,
|
||||
GLenum mode, GLint start, GLsizei count)
|
||||
{
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
|
||||
if (count<0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" );
|
||||
|
|
@ -131,9 +130,8 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
|
|||
if (ctx->NewState)
|
||||
_mesa_update_state( ctx );
|
||||
|
||||
if (!ctx->Array.Vertex.Enabled)
|
||||
if (!ctx->Array.Vertex.Enabled)
|
||||
return GL_FALSE;
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: api_validate.h,v 1.1 2000/12/26 05:09:27 keithw Exp $ */
|
||||
/* $Id: api_validate.h,v 1.2 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -37,13 +37,13 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
|
|||
|
||||
extern GLboolean
|
||||
_mesa_validate_DrawElements(GLcontext *ctx,
|
||||
GLenum mode, GLsizei count, GLenum type,
|
||||
GLenum mode, GLsizei count, GLenum type,
|
||||
const GLvoid *indices);
|
||||
|
||||
extern GLboolean
|
||||
_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
|
||||
GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
|
||||
GLuint start, GLuint end,
|
||||
GLsizei count, GLenum type,
|
||||
const GLvoid *indices);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: attrib.c,v 1.45 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: attrib.c,v 1.46 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -983,6 +983,3 @@ _mesa_PopClientAttrib(void)
|
|||
attr = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: attrib.h,v 1.4 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: attrib.h,v 1.5 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: blend.c,v 1.30 2001/03/07 00:21:32 brianp Exp $ */
|
||||
/* $Id: blend.c,v 1.31 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
void
|
||||
_mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
|
||||
{
|
||||
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
|
|||
ctx->Color.BlendDstRGB = ctx->Color.BlendDstA = dfactor;
|
||||
ctx->Color.BlendSrcRGB = ctx->Color.BlendSrcA = sfactor;
|
||||
|
||||
if (ctx->Driver.BlendFunc)
|
||||
if (ctx->Driver.BlendFunc)
|
||||
ctx->Driver.BlendFunc( ctx, sfactor, dfactor );
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ _mesa_BlendEquation( GLenum mode )
|
|||
/* This is needed to support 1.1's RGB logic ops AND
|
||||
* 1.0's blending logicops.
|
||||
*/
|
||||
ctx->Color.ColorLogicOpEnabled = (mode==GL_LOGIC_OP &&
|
||||
ctx->Color.ColorLogicOpEnabled = (mode==GL_LOGIC_OP &&
|
||||
ctx->Color.BlendEnabled);
|
||||
|
||||
if (ctx->Driver.BlendEquation)
|
||||
|
|
@ -339,4 +339,3 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
|
|||
if (ctx->Driver.BlendColor)
|
||||
(*ctx->Driver.BlendColor)(ctx, tmp);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: blend.h,v 1.7 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: blend.h,v 1.8 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: buffers.c,v 1.27 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: buffers.c,v 1.28 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -53,7 +53,7 @@ _mesa_ClearIndex( GLfloat c )
|
|||
|
||||
if (ctx->Color.ClearIndex == (GLuint) c)
|
||||
return;
|
||||
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
ctx->Color.ClearIndex = (GLuint) c;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: buffers.h,v 1.2 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: buffers.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: clip.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
|
||||
/* $Id: clip.c,v 1.22 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -84,7 +84,7 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq )
|
|||
|
||||
if (TEST_EQ_4V(ctx->Transform.EyeUserPlane[p], equation))
|
||||
return;
|
||||
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
|
||||
COPY_4FV(ctx->Transform.EyeUserPlane[p], equation);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: clip.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: clip.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.1
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: colortab.c,v 1.36 2001/03/07 05:06:11 brianp Exp $ */
|
||||
/* $Id: colortab.c,v 1.37 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -184,7 +184,7 @@ set_component_sizes( struct gl_color_table *table )
|
|||
|
||||
|
||||
|
||||
void
|
||||
void
|
||||
_mesa_ColorTable( GLenum target, GLenum internalFormat,
|
||||
GLsizei width, GLenum format, GLenum type,
|
||||
const GLvoid *data )
|
||||
|
|
@ -424,7 +424,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
|
|||
(*ctx->Driver.UpdateTexturePalette)( ctx, texObj );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ctx->NewState |= _NEW_PIXEL;
|
||||
}
|
||||
|
||||
|
|
@ -598,7 +598,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
|
|||
(*ctx->Driver.UpdateTexturePalette)( ctx, texObj );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ctx->NewState |= _NEW_PIXEL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: colortab.h,v 1.8 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: colortab.h,v 1.9 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: config.h,v 1.26 2000/12/28 22:11:05 keithw Exp $ */
|
||||
/* $Id: config.h,v 1.27 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: context.h,v 1.24 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: context.h,v 1.25 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: convolve.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
|
||||
/* $Id: convolve.c,v 1.22 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -550,13 +550,13 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi
|
|||
ctx->Unpack.SkipImages = 0;
|
||||
ctx->Unpack.SwapBytes = GL_FALSE;
|
||||
ctx->Unpack.LsbFirst = GL_FALSE;
|
||||
ctx->NewState |= _NEW_PACKUNPACK;
|
||||
ctx->NewState |= _NEW_PACKUNPACK;
|
||||
|
||||
_mesa_ConvolutionFilter2D(target, internalFormat, width, height,
|
||||
GL_RGBA, CHAN_TYPE, rgba);
|
||||
|
||||
ctx->Unpack = packSave; /* restore pixel packing params */
|
||||
ctx->NewState |= _NEW_PACKUNPACK;
|
||||
ctx->NewState |= _NEW_PACKUNPACK;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1450,4 +1450,3 @@ _mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions,
|
|||
*height = *height - (MAX2(ctx->Separable2D.Height, 1) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: dd.h,v 1.57 2001/03/11 18:49:11 gareth Exp $ */
|
||||
/* $Id: dd.h,v 1.58 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,29 @@
|
|||
/* $Id: debug.c,v 1.9 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "mtypes.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,29 @@
|
|||
/* $Id: debug.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DEBUG_H
|
||||
#define _DEBUG_H
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: depth.c,v 1.26 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: depth.c,v 1.27 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -87,9 +87,9 @@ _mesa_DepthFunc( GLenum func )
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->Depth.Func == func)
|
||||
if (ctx->Depth.Func == func)
|
||||
return;
|
||||
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
ctx->Depth.Func = func;
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ _mesa_DepthFunc( GLenum func )
|
|||
else
|
||||
ctx->_TriangleCaps &= ~DD_Z_NEVER;
|
||||
|
||||
if (ctx->Driver.DepthFunc)
|
||||
if (ctx->Driver.DepthFunc)
|
||||
ctx->Driver.DepthFunc( ctx, func );
|
||||
}
|
||||
|
||||
|
|
@ -117,14 +117,12 @@ _mesa_DepthMask( GLboolean flag )
|
|||
* GL_TRUE indicates depth buffer writing is enabled (default)
|
||||
* GL_FALSE indicates depth buffer writing is disabled
|
||||
*/
|
||||
if (ctx->Depth.Mask == flag)
|
||||
if (ctx->Depth.Mask == flag)
|
||||
return;
|
||||
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
ctx->Depth.Mask = flag;
|
||||
|
||||
if (ctx->Driver.DepthMask)
|
||||
if (ctx->Driver.DepthMask)
|
||||
ctx->Driver.DepthMask( ctx, flag );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: depth.h,v 1.10 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: depth.h,v 1.11 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: dispatch.c,v 1.19 2001/01/08 04:09:41 keithw Exp $ */
|
||||
/* $Id: dispatch.c,v 1.20 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -117,4 +117,3 @@ trace(void)
|
|||
|
||||
#define DO_GEOMETRY
|
||||
#include "glapitemp.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: dlist.c,v 1.66 2001/03/07 05:06:11 brianp Exp $ */
|
||||
/* $Id: dlist.c,v 1.67 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -4767,7 +4767,7 @@ _mesa_NewList( GLuint list, GLenum mode )
|
|||
|
||||
|
||||
/*
|
||||
* End definition of current display list. Is the current
|
||||
* End definition of current display list. Is the current
|
||||
* ASSERT_OUTSIDE_BEGIN_END strong enough to really guarentee that
|
||||
* we are outside begin/end calls?
|
||||
*/
|
||||
|
|
@ -5088,7 +5088,7 @@ static void exec_GetTexLevelParameteriv( GLenum target, GLint level,
|
|||
ctx->Exec->GetTexLevelParameteriv( target, level, pname, params );
|
||||
}
|
||||
|
||||
static void exec_GetTexParameterfv( GLenum target, GLenum pname,
|
||||
static void exec_GetTexParameterfv( GLenum target, GLenum pname,
|
||||
GLfloat *params )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5161,7 +5161,7 @@ static GLboolean exec_AreTexturesResident(GLsizei n, const GLuint *texName,
|
|||
return ctx->Exec->AreTexturesResident( n, texName, residences);
|
||||
}
|
||||
|
||||
static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
|
||||
static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid *ptr)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5218,7 +5218,7 @@ static void exec_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
|
|||
ctx->Exec->IndexPointer( type, stride, ptr);
|
||||
}
|
||||
|
||||
static void exec_InterleavedArrays(GLenum format, GLsizei stride,
|
||||
static void exec_InterleavedArrays(GLenum format, GLsizei stride,
|
||||
const GLvoid *pointer)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5254,7 +5254,7 @@ static void exec_PushClientAttrib(GLbitfield mask)
|
|||
ctx->Exec->PushClientAttrib( mask);
|
||||
}
|
||||
|
||||
static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
|
||||
static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid *ptr)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5262,7 +5262,7 @@ static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
|
|||
ctx->Exec->TexCoordPointer( size, type, stride, ptr);
|
||||
}
|
||||
|
||||
static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
|
||||
static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
|
||||
GLvoid *img)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5270,7 +5270,7 @@ static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
|
|||
ctx->Exec->GetCompressedTexImageARB( target, level, img);
|
||||
}
|
||||
|
||||
static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
|
||||
static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
|
||||
const GLvoid *ptr)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5278,7 +5278,7 @@ static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
|
|||
ctx->Exec->VertexPointer( size, type, stride, ptr);
|
||||
}
|
||||
|
||||
static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
|
||||
static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
|
||||
GLint x, GLint y, GLsizei width)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5304,7 +5304,7 @@ static void exec_GetColorTable( GLenum target, GLenum format,
|
|||
ctx->Exec->GetColorTable( target, format, type, data );
|
||||
}
|
||||
|
||||
static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
|
||||
static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
|
||||
GLfloat *params )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5312,7 +5312,7 @@ static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
|
|||
ctx->Exec->GetColorTableParameterfv( target, pname, params );
|
||||
}
|
||||
|
||||
static void exec_GetColorTableParameteriv( GLenum target, GLenum pname,
|
||||
static void exec_GetColorTableParameteriv( GLenum target, GLenum pname,
|
||||
GLint *params )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5328,7 +5328,7 @@ static void exec_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
|
|||
ctx->Exec->GetConvolutionFilter( target, format, type, image);
|
||||
}
|
||||
|
||||
static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
|
||||
static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
|
||||
GLfloat *params)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5344,7 +5344,7 @@ static void exec_GetConvolutionParameteriv(GLenum target, GLenum pname,
|
|||
ctx->Exec->GetConvolutionParameteriv( target, pname, params);
|
||||
}
|
||||
|
||||
static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
|
||||
static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
|
||||
GLenum type, GLvoid *values)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5352,7 +5352,7 @@ static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
|
|||
ctx->Exec->GetHistogram( target, reset, format, type, values);
|
||||
}
|
||||
|
||||
static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
|
||||
static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
|
||||
GLfloat *params)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5360,7 +5360,7 @@ static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
|
|||
ctx->Exec->GetHistogramParameterfv( target, pname, params);
|
||||
}
|
||||
|
||||
static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
|
||||
static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
|
||||
GLint *params)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5368,7 +5368,7 @@ static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
|
|||
ctx->Exec->GetHistogramParameteriv( target, pname, params);
|
||||
}
|
||||
|
||||
static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
|
||||
static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
|
||||
GLenum type, GLvoid *values)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5392,7 +5392,7 @@ static void exec_GetMinmaxParameteriv(GLenum target, GLenum pname,
|
|||
ctx->Exec->GetMinmaxParameteriv( target, pname, params);
|
||||
}
|
||||
|
||||
static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
|
||||
static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
|
||||
GLvoid *row, GLvoid *column, GLvoid *span)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
@ -5502,7 +5502,7 @@ static void exec_SecondaryColorPointerEXT(GLint size, GLenum type,
|
|||
ctx->Exec->SecondaryColorPointerEXT( size, type, stride, ptr);
|
||||
}
|
||||
|
||||
static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
|
||||
static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
|
||||
const GLvoid *ptr)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: dlist.h,v 1.13 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: dlist.h,v 1.14 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -91,7 +91,7 @@ _mesa_alloc_opcode( GLcontext *ctx, GLuint sz,
|
|||
void (*destroy)( GLcontext *, void * ),
|
||||
void (*print)( GLcontext *, void * ) );
|
||||
|
||||
extern void _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2,
|
||||
extern void _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2,
|
||||
GLint j1, GLint j2 );
|
||||
extern void _mesa_save_EvalMesh1( GLenum mode, GLint i1, GLint i2 );
|
||||
extern void _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists );
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: drawpix.c,v 1.49 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: drawpix.c,v 1.50 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -102,4 +102,3 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: drawpix.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: drawpix.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: enable.c,v 1.44 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: enable.c,v 1.45 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -67,7 +67,7 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
var = &ctx->Array.Index.Enabled;
|
||||
flag = _NEW_ARRAY_INDEX;
|
||||
break;
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
var = &ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled;
|
||||
flag = _NEW_ARRAY_TEXCOORD(ctx->Array.ActiveTexture);
|
||||
break;
|
||||
|
|
@ -95,7 +95,7 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
ctx->Array.NewState |= flag;
|
||||
*var = state;
|
||||
|
||||
if (state)
|
||||
if (state)
|
||||
ctx->Array._Enabled |= flag;
|
||||
else
|
||||
ctx->Array._Enabled &= ~flag;
|
||||
|
|
@ -139,7 +139,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
|
||||
switch (cap) {
|
||||
case GL_ALPHA_TEST:
|
||||
if (ctx->Color.AlphaEnabled == state)
|
||||
if (ctx->Color.AlphaEnabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
ctx->Color.AlphaEnabled = state;
|
||||
|
|
@ -151,13 +151,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
ctx->Eval.AutoNormal = state;
|
||||
break;
|
||||
case GL_BLEND:
|
||||
if (ctx->Color.BlendEnabled == state)
|
||||
if (ctx->Color.BlendEnabled == state)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
ctx->Color.BlendEnabled = state;
|
||||
/* The following needed to accomodate 1.0 RGB logic op blending */
|
||||
ctx->Color.ColorLogicOpEnabled =
|
||||
ctx->Color.ColorLogicOpEnabled =
|
||||
(ctx->Color.BlendEquation == GL_LOGIC_OP && state);
|
||||
break;
|
||||
case GL_CLIP_PLANE0:
|
||||
|
|
@ -167,7 +167,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
case GL_CLIP_PLANE4:
|
||||
case GL_CLIP_PLANE5: {
|
||||
GLuint p = cap-GL_CLIP_PLANE0;
|
||||
|
||||
|
||||
if (ctx->Transform.ClipEnabled[p] == state)
|
||||
return;
|
||||
|
||||
|
|
@ -177,11 +177,11 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
if (state) {
|
||||
ctx->_Enabled |= ENABLE_USERCLIP;
|
||||
ctx->Transform._AnyClip++;
|
||||
|
||||
|
||||
if (ctx->ProjectionMatrix.flags & MAT_DIRTY) {
|
||||
_math_matrix_analyse( &ctx->ProjectionMatrix );
|
||||
}
|
||||
|
||||
|
||||
/* This derived state also calculated in clip.c and
|
||||
* from _mesa_update_state() on changes to EyeUserPlane
|
||||
* and ctx->ProjectionMatrix respectively.
|
||||
|
|
@ -191,12 +191,12 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
ctx->ProjectionMatrix.inv );
|
||||
} else {
|
||||
if (--ctx->Transform._AnyClip == 0)
|
||||
ctx->_Enabled &= ~ENABLE_USERCLIP;
|
||||
}
|
||||
ctx->_Enabled &= ~ENABLE_USERCLIP;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_COLOR_MATERIAL:
|
||||
if (ctx->Light.ColorMaterialEnabled == state)
|
||||
if (ctx->Light.ColorMaterialEnabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_LIGHT);
|
||||
ctx->Light.ColorMaterialEnabled = state;
|
||||
|
|
@ -206,7 +206,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
}
|
||||
break;
|
||||
case GL_CULL_FACE:
|
||||
if (ctx->Polygon.CullFlag == state)
|
||||
if (ctx->Polygon.CullFlag == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
||||
ctx->Polygon.CullFlag = state;
|
||||
|
|
@ -216,7 +216,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
_mesa_warning(ctx,"glEnable(GL_DEPTH_TEST) but no depth buffer");
|
||||
return;
|
||||
}
|
||||
if (ctx->Depth.Test==state)
|
||||
if (ctx->Depth.Test==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_DEPTH);
|
||||
ctx->Depth.Test = state;
|
||||
|
|
@ -225,13 +225,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
if (ctx->NoDither) {
|
||||
state = GL_FALSE; /* MESA_NO_DITHER env var */
|
||||
}
|
||||
if (ctx->Color.DitherFlag==state)
|
||||
if (ctx->Color.DitherFlag==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
ctx->Color.DitherFlag = state;
|
||||
break;
|
||||
case GL_FOG:
|
||||
if (ctx->Fog.Enabled==state)
|
||||
if (ctx->Fog.Enabled==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_FOG);
|
||||
ctx->Fog.Enabled = state;
|
||||
|
|
@ -255,7 +255,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
case GL_LIGHT5:
|
||||
case GL_LIGHT6:
|
||||
case GL_LIGHT7:
|
||||
if (ctx->Light.Light[cap-GL_LIGHT0].Enabled == state)
|
||||
if (ctx->Light.Light[cap-GL_LIGHT0].Enabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_LIGHT);
|
||||
ctx->Light.Light[cap-GL_LIGHT0].Enabled = state;
|
||||
|
|
@ -268,7 +268,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
}
|
||||
break;
|
||||
case GL_LIGHTING:
|
||||
if (ctx->Light.Enabled == state)
|
||||
if (ctx->Light.Enabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_LIGHT);
|
||||
ctx->Light.Enabled = state;
|
||||
|
|
@ -277,33 +277,33 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
if ((ctx->Light.Enabled &&
|
||||
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|
||||
|| ctx->Fog.ColorSumEnabled)
|
||||
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
|
||||
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
|
||||
else
|
||||
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
|
||||
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
|
||||
|
||||
break;
|
||||
case GL_LINE_SMOOTH:
|
||||
if (ctx->Line.SmoothFlag == state)
|
||||
if (ctx->Line.SmoothFlag == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_LINE);
|
||||
ctx->Line.SmoothFlag = state;
|
||||
ctx->_TriangleCaps ^= DD_LINE_SMOOTH;
|
||||
break;
|
||||
case GL_LINE_STIPPLE:
|
||||
if (ctx->Line.StippleFlag == state)
|
||||
if (ctx->Line.StippleFlag == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_LINE);
|
||||
ctx->Line.StippleFlag = state;
|
||||
ctx->_TriangleCaps ^= DD_LINE_STIPPLE;
|
||||
break;
|
||||
case GL_INDEX_LOGIC_OP:
|
||||
if (ctx->Color.IndexLogicOpEnabled == state)
|
||||
if (ctx->Color.IndexLogicOpEnabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
ctx->Color.IndexLogicOpEnabled = state;
|
||||
break;
|
||||
case GL_COLOR_LOGIC_OP:
|
||||
if (ctx->Color.ColorLogicOpEnabled == state)
|
||||
if (ctx->Color.ColorLogicOpEnabled == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_COLOR);
|
||||
ctx->Color.ColorLogicOpEnabled = state;
|
||||
|
|
@ -423,61 +423,61 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
ctx->Pixel.MinMaxEnabled = state;
|
||||
break;
|
||||
case GL_NORMALIZE:
|
||||
if (ctx->Transform.Normalize == state)
|
||||
if (ctx->Transform.Normalize == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
|
||||
ctx->Transform.Normalize = state;
|
||||
ctx->_Enabled ^= ENABLE_NORMALIZE;
|
||||
break;
|
||||
case GL_POINT_SMOOTH:
|
||||
if (ctx->Point.SmoothFlag==state)
|
||||
if (ctx->Point.SmoothFlag==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_POINT);
|
||||
ctx->Point.SmoothFlag = state;
|
||||
ctx->_TriangleCaps ^= DD_POINT_SMOOTH;
|
||||
break;
|
||||
case GL_POLYGON_SMOOTH:
|
||||
if (ctx->Polygon.SmoothFlag==state)
|
||||
if (ctx->Polygon.SmoothFlag==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
||||
ctx->Polygon.SmoothFlag = state;
|
||||
ctx->_TriangleCaps ^= DD_TRI_SMOOTH;
|
||||
break;
|
||||
case GL_POLYGON_STIPPLE:
|
||||
if (ctx->Polygon.StippleFlag==state)
|
||||
if (ctx->Polygon.StippleFlag==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
||||
ctx->Polygon.StippleFlag = state;
|
||||
ctx->_TriangleCaps ^= DD_TRI_STIPPLE;
|
||||
break;
|
||||
case GL_POLYGON_OFFSET_POINT:
|
||||
if (ctx->Polygon.OffsetPoint==state)
|
||||
if (ctx->Polygon.OffsetPoint==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
||||
ctx->Polygon.OffsetPoint = state;
|
||||
break;
|
||||
case GL_POLYGON_OFFSET_LINE:
|
||||
if (ctx->Polygon.OffsetLine==state)
|
||||
if (ctx->Polygon.OffsetLine==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
||||
ctx->Polygon.OffsetLine = state;
|
||||
break;
|
||||
case GL_POLYGON_OFFSET_FILL:
|
||||
/*case GL_POLYGON_OFFSET_EXT:*/
|
||||
if (ctx->Polygon.OffsetFill==state)
|
||||
if (ctx->Polygon.OffsetFill==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
||||
ctx->Polygon.OffsetFill = state;
|
||||
break;
|
||||
case GL_RESCALE_NORMAL_EXT:
|
||||
if (ctx->Transform.RescaleNormals == state)
|
||||
if (ctx->Transform.RescaleNormals == state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
|
||||
ctx->Transform.RescaleNormals = state;
|
||||
ctx->_Enabled ^= ENABLE_RESCALE;
|
||||
break;
|
||||
case GL_SCISSOR_TEST:
|
||||
if (ctx->Scissor.Enabled==state)
|
||||
if (ctx->Scissor.Enabled==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_SCISSOR);
|
||||
ctx->Scissor.Enabled = state;
|
||||
|
|
@ -493,7 +493,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
_mesa_warning(ctx, "glEnable(GL_STENCIL_TEST) but no stencil buffer");
|
||||
return;
|
||||
}
|
||||
if (ctx->Stencil.Enabled==state)
|
||||
if (ctx->Stencil.Enabled==state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_STENCIL);
|
||||
ctx->Stencil.Enabled = state;
|
||||
|
|
@ -503,7 +503,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
const GLuint curr = ctx->Texture.CurrentUnit;
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
|
||||
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_1D;
|
||||
if (state)
|
||||
if (state)
|
||||
newenabled |= TEXTURE0_1D;
|
||||
if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled)
|
||||
return;
|
||||
|
|
@ -515,7 +515,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
const GLuint curr = ctx->Texture.CurrentUnit;
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
|
||||
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_2D;
|
||||
if (state)
|
||||
if (state)
|
||||
newenabled |= TEXTURE0_2D;
|
||||
if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled)
|
||||
return;
|
||||
|
|
@ -527,7 +527,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
const GLuint curr = ctx->Texture.CurrentUnit;
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
|
||||
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_3D;
|
||||
if (state)
|
||||
if (state)
|
||||
newenabled |= TEXTURE0_3D;
|
||||
if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled)
|
||||
return;
|
||||
|
|
@ -558,7 +558,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texUnit->TexGenEnabled = newenabled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_GEN_S: {
|
||||
GLuint unit = ctx->Texture.CurrentUnit;
|
||||
|
|
@ -571,7 +571,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texUnit->TexGenEnabled = newenabled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_GEN_T: {
|
||||
GLuint unit = ctx->Texture.CurrentUnit;
|
||||
|
|
@ -594,7 +594,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
case GL_NORMAL_ARRAY:
|
||||
case GL_COLOR_ARRAY:
|
||||
case GL_INDEX_ARRAY:
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
case GL_TEXTURE_COORD_ARRAY:
|
||||
case GL_EDGE_FLAG_ARRAY:
|
||||
case GL_FOG_COORDINATE_ARRAY_EXT:
|
||||
case GL_SECONDARY_COLOR_ARRAY_EXT:
|
||||
|
|
@ -710,7 +710,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
const GLuint curr = ctx->Texture.CurrentUnit;
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
|
||||
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_CUBE;
|
||||
if (state)
|
||||
if (state)
|
||||
newenabled |= TEXTURE0_CUBE;
|
||||
if (!ctx->Extensions.ARB_texture_cube_map) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable");
|
||||
|
|
@ -732,13 +732,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
|
|||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_FOG);
|
||||
ctx->Fog.ColorSumEnabled = state;
|
||||
|
||||
|
||||
if ((ctx->Light.Enabled &&
|
||||
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|
||||
|| ctx->Fog.ColorSumEnabled)
|
||||
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
|
||||
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
|
||||
else
|
||||
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
|
||||
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
|
||||
|
||||
break;
|
||||
|
||||
|
|
@ -1011,10 +1011,3 @@ _mesa_IsEnabled( GLenum cap )
|
|||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: enable.h,v 1.3 2000/11/22 07:32:16 joukj Exp $ */
|
||||
/* $Id: enable.h,v 1.4 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: enums.c,v 1.13 2001/03/07 05:06:11 brianp Exp $ */
|
||||
/* $Id: enums.c,v 1.14 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*
|
||||
* Author:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
*/
|
||||
|
|
@ -911,5 +911,3 @@ const char *_mesa_lookup_enum_by_nr( int nr )
|
|||
|
||||
return f ? (*f)->c : "(unknown)";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: enums.h,v 1.2 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: enums.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.1
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: eval.c,v 1.18 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: eval.c,v 1.19 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -252,7 +252,7 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride,
|
|||
GLint k;
|
||||
GLfloat *pnts;
|
||||
struct gl_1d_map *map = 0;
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
assert(type == GL_FLOAT || type == GL_DOUBLE);
|
||||
|
||||
|
|
@ -432,8 +432,8 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
|
|||
else
|
||||
pnts = _mesa_copy_map_points2d(target, ustride, uorder,
|
||||
vstride, vorder, (GLdouble*) points);
|
||||
|
||||
|
||||
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_EVAL);
|
||||
map->Uorder = uorder;
|
||||
map->u1 = u1;
|
||||
|
|
@ -1354,7 +1354,3 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
|
|||
{
|
||||
_mesa_MapGrid2f( un, u1, u2, vn, v1, v2 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: eval.h,v 1.5 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: eval.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: extensions.h,v 1.12 2001/02/26 23:58:12 brianp Exp $ */
|
||||
/* $Id: extensions.h,v 1.13 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -51,5 +51,3 @@ extern void _mesa_extensions_ctr( GLcontext *ctx );
|
|||
extern const char *_mesa_extensions_get_string( GLcontext *ctx );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: feedback.c,v 1.22 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: feedback.c,v 1.23 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -52,7 +52,7 @@ void
|
|||
_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (ctx->RenderMode==GL_FEEDBACK) {
|
||||
_mesa_error( ctx, GL_INVALID_OPERATION, "glFeedbackBuffer" );
|
||||
|
|
@ -64,7 +64,7 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
|
|||
}
|
||||
if (!buffer) {
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(buffer==NULL)" );
|
||||
ctx->Feedback.BufferSize = 0;
|
||||
ctx->Feedback.BufferSize = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -76,16 +76,16 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
|
|||
ctx->Feedback._Mask = FB_3D;
|
||||
break;
|
||||
case GL_3D_COLOR:
|
||||
ctx->Feedback._Mask = (FB_3D |
|
||||
ctx->Feedback._Mask = (FB_3D |
|
||||
(ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX));
|
||||
break;
|
||||
case GL_3D_COLOR_TEXTURE:
|
||||
ctx->Feedback._Mask = (FB_3D |
|
||||
(ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
|
||||
ctx->Feedback._Mask = (FB_3D |
|
||||
(ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
|
||||
FB_TEXTURE);
|
||||
break;
|
||||
case GL_4D_COLOR_TEXTURE:
|
||||
ctx->Feedback._Mask = (FB_3D | FB_4D |
|
||||
ctx->Feedback._Mask = (FB_3D | FB_4D |
|
||||
(ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
|
||||
FB_TEXTURE);
|
||||
break;
|
||||
|
|
@ -405,9 +405,8 @@ _mesa_RenderMode( GLenum mode )
|
|||
}
|
||||
|
||||
ctx->RenderMode = mode;
|
||||
if (ctx->Driver.RenderMode)
|
||||
if (ctx->Driver.RenderMode)
|
||||
ctx->Driver.RenderMode( ctx, mode );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: feedback.h,v 1.6 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: feedback.h,v 1.7 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -75,4 +75,3 @@ _mesa_RenderMode( GLenum mode );
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: fog.c,v 1.33 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: fog.c,v 1.34 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -132,7 +132,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
|
|||
ctx->Fog.Index = *params;
|
||||
break;
|
||||
case GL_FOG_COLOR:
|
||||
if (TEST_EQ_4V(ctx->Fog.Color, params))
|
||||
if (TEST_EQ_4V(ctx->Fog.Color, params))
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_FOG);
|
||||
ctx->Fog.Color[0] = params[0];
|
||||
|
|
@ -161,5 +161,3 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
|
|||
(*ctx->Driver.Fogfv)( ctx, pname, params );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: fog.h,v 1.11 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: fog.h,v 1.12 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: get.c,v 1.55 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: get.c,v 1.56 2001/03/12 00:48:37 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -1214,7 +1214,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
|||
case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
|
||||
*params = ctx->Pixel.PostColorMatrixColorTableEnabled;
|
||||
break;
|
||||
|
||||
|
||||
/* GL_EXT_secondary_color */
|
||||
case GL_COLOR_SUM_EXT:
|
||||
*params = ctx->Fog.ColorSumEnabled;
|
||||
|
|
@ -4568,7 +4568,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
|||
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
|
||||
*params = ctx->Array.LockCount;
|
||||
break;
|
||||
|
||||
|
||||
/* GL_ARB_transpose_matrix */
|
||||
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
|
||||
{
|
||||
|
|
@ -4937,4 +4937,3 @@ _mesa_GetError( void )
|
|||
ctx->ErrorValue = (GLenum) GL_NO_ERROR;
|
||||
return e;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: get.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: get.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -56,4 +56,3 @@ _mesa_GetError( void );
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: glheader.h,v 1.17 2001/02/09 23:39:02 brianp Exp $ */
|
||||
/* $Id: glheader.h,v 1.18 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#if defined(__linux__) && defined(__i386__)
|
||||
#if defined(__linux__) && defined(__i386__)
|
||||
#include <fpu_control.h>
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: hash.c,v 1.9 2000/03/21 22:20:42 brianp Exp $ */
|
||||
/* $Id: hash.c,v 1.10 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: hash.h,v 1.4 2000/03/21 22:20:42 brianp Exp $ */
|
||||
/* $Id: hash.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: hint.c,v 1.8 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: hint.c,v 1.9 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -117,6 +117,6 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode )
|
|||
if (ctx->Driver.Hint) {
|
||||
(*ctx->Driver.Hint)( ctx, target, mode );
|
||||
}
|
||||
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: histogram.c,v 1.9 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: histogram.c,v 1.10 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -950,7 +950,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
|
|||
ctx->Histogram.AlphaSize = 8 * sizeof(GLuint);
|
||||
ctx->Histogram.LuminanceSize = 8 * sizeof(GLuint);
|
||||
}
|
||||
|
||||
|
||||
ctx->NewState |= _NEW_PIXEL;
|
||||
}
|
||||
|
||||
|
|
@ -975,7 +975,7 @@ _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
|
|||
_mesa_error(ctx, GL_INVALID_ENUM, "glMinMax(internalFormat)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (ctx->MinMax.Sink == sink)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_PIXEL);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: histogram.h,v 1.2 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: histogram.h,v 1.3 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: imports.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
|
||||
/* $Id: imports.c,v 1.8 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -79,7 +79,7 @@ _mesa_warning(__GLcontext *gc, char *str)
|
|||
/* Whacko XFree86 macro:
|
||||
*/
|
||||
#ifdef getenv
|
||||
#undef getenv
|
||||
#undef getenv
|
||||
#endif
|
||||
if (gc->imports.getenv(gc, "MESA_DEBUG")) {
|
||||
debug = GL_TRUE;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: imports.h,v 1.1 2000/09/26 20:53:53 brianp Exp $ */
|
||||
/* $Id: imports.h,v 1.2 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: light.c,v 1.40 2001/03/07 05:06:12 brianp Exp $ */
|
||||
/* $Id: light.c,v 1.41 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -64,7 +64,7 @@ _mesa_ShadeModel( GLenum mode )
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->Light.ShadeModel == mode)
|
||||
if (ctx->Light.ShadeModel == mode)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_LIGHT);
|
||||
|
|
@ -146,7 +146,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
|
|||
_mesa_error( ctx, GL_INVALID_VALUE, "glLight" );
|
||||
return;
|
||||
}
|
||||
if (l->SpotExponent == params[0])
|
||||
if (l->SpotExponent == params[0])
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_LIGHT);
|
||||
l->SpotExponent = params[0];
|
||||
|
|
@ -409,9 +409,9 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params )
|
|||
ctx->Light.Model.TwoSide = newbool;
|
||||
break;
|
||||
case GL_LIGHT_MODEL_COLOR_CONTROL:
|
||||
if (params[0] == (GLfloat) GL_SINGLE_COLOR)
|
||||
if (params[0] == (GLfloat) GL_SINGLE_COLOR)
|
||||
newenum = GL_SINGLE_COLOR;
|
||||
else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR)
|
||||
else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR)
|
||||
newenum = GL_SEPARATE_SPECULAR_COLOR;
|
||||
else {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glLightModel(param)" );
|
||||
|
|
@ -425,9 +425,9 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params )
|
|||
if ((ctx->Light.Enabled &&
|
||||
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|
||||
|| ctx->Fog.ColorSumEnabled)
|
||||
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
|
||||
ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
|
||||
else
|
||||
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
|
||||
ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
|
||||
|
||||
break;
|
||||
default:
|
||||
|
|
@ -600,7 +600,7 @@ void _mesa_copy_material_pairs( struct gl_material dst[2],
|
|||
*
|
||||
* src[0] is front material, src[1] is back material
|
||||
*
|
||||
* Additionally keeps the precomputed lighting state uptodate.
|
||||
* Additionally keeps the precomputed lighting state uptodate.
|
||||
*/
|
||||
void _mesa_update_material( GLcontext *ctx,
|
||||
const struct gl_material src[2],
|
||||
|
|
@ -647,13 +647,13 @@ void _mesa_update_material( GLcontext *ctx,
|
|||
if (bitmask & (FRONT_EMISSION_BIT | FRONT_AMBIENT_BIT)) {
|
||||
struct gl_material *mat = &ctx->Light.Material[0];
|
||||
COPY_3V( ctx->Light._BaseColor[0], mat->Emission );
|
||||
ACC_SCALE_3V( ctx->Light._BaseColor[0], mat->Ambient,
|
||||
ACC_SCALE_3V( ctx->Light._BaseColor[0], mat->Ambient,
|
||||
ctx->Light.Model.Ambient );
|
||||
}
|
||||
if (bitmask & (BACK_EMISSION_BIT | BACK_AMBIENT_BIT)) {
|
||||
struct gl_material *mat = &ctx->Light.Material[1];
|
||||
COPY_3V( ctx->Light._BaseColor[1], mat->Emission );
|
||||
ACC_SCALE_3V( ctx->Light._BaseColor[1], mat->Ambient,
|
||||
ACC_SCALE_3V( ctx->Light._BaseColor[1], mat->Ambient,
|
||||
ctx->Light.Model.Ambient );
|
||||
}
|
||||
|
||||
|
|
@ -1071,7 +1071,7 @@ static void validate_spot_exp_table( struct gl_light *l )
|
|||
l->_SpotExpTable[i][0] = tmp;
|
||||
}
|
||||
for (i = 0; i < EXP_TABLE_SIZE - 1; i++) {
|
||||
l->_SpotExpTable[i][1] = (l->_SpotExpTable[i+1][0] -
|
||||
l->_SpotExpTable[i][1] = (l->_SpotExpTable[i+1][0] -
|
||||
l->_SpotExpTable[i][0]);
|
||||
}
|
||||
l->_SpotExpTable[EXP_TABLE_SIZE-1][1] = 0.0;
|
||||
|
|
@ -1087,7 +1087,7 @@ static void validate_spot_exp_table( struct gl_light *l )
|
|||
void
|
||||
_mesa_invalidate_shine_table( GLcontext *ctx, GLuint i )
|
||||
{
|
||||
if (ctx->_ShineTable[i])
|
||||
if (ctx->_ShineTable[i])
|
||||
ctx->_ShineTable[i]->refcount--;
|
||||
ctx->_ShineTable[i] = 0;
|
||||
}
|
||||
|
|
@ -1132,7 +1132,7 @@ static void validate_shine_table( GLcontext *ctx, GLuint i, GLfloat shininess )
|
|||
s->shininess = shininess;
|
||||
}
|
||||
|
||||
if (ctx->_ShineTable[i])
|
||||
if (ctx->_ShineTable[i])
|
||||
ctx->_ShineTable[i]->refcount--;
|
||||
|
||||
ctx->_ShineTable[i] = s;
|
||||
|
|
@ -1140,7 +1140,7 @@ static void validate_shine_table( GLcontext *ctx, GLuint i, GLfloat shininess )
|
|||
s->refcount++;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
_mesa_validate_all_lighting_tables( GLcontext *ctx )
|
||||
{
|
||||
GLint i;
|
||||
|
|
@ -1154,7 +1154,7 @@ _mesa_validate_all_lighting_tables( GLcontext *ctx )
|
|||
if (!ctx->_ShineTable[1] || ctx->_ShineTable[1]->shininess != shininess)
|
||||
validate_shine_table( ctx, 1, shininess );
|
||||
|
||||
for (i = 0 ; i < MAX_LIGHTS ; i++)
|
||||
for (i = 0 ; i < MAX_LIGHTS ; i++)
|
||||
if (ctx->Light.Light[i]._SpotExpTable[0][0] == -1)
|
||||
validate_spot_exp_table( &ctx->Light.Light[i] );
|
||||
}
|
||||
|
|
@ -1210,7 +1210,7 @@ _mesa_update_lighting( GLcontext *ctx )
|
|||
/* Precompute some shading values. Although we reference
|
||||
* Light.Material here, we can get away without flushing
|
||||
* FLUSH_UPDATE_CURRENT, as when any outstanding material changes
|
||||
* are flushed, they will update the derived state at that time.
|
||||
* are flushed, they will update the derived state at that time.
|
||||
*/
|
||||
if (ctx->Visual.rgbMode) {
|
||||
GLuint sides = ctx->Light.Model.TwoSide ? 2 : 1;
|
||||
|
|
@ -1227,7 +1227,7 @@ _mesa_update_lighting( GLcontext *ctx )
|
|||
ctx->Light.Material[side].Diffuse[3] );
|
||||
}
|
||||
|
||||
foreach (light, &ctx->Light.EnabledList) {
|
||||
foreach (light, &ctx->Light.EnabledList) {
|
||||
for (side=0; side< sides; side++) {
|
||||
const struct gl_material *mat = &ctx->Light.Material[side];
|
||||
SCALE_3V( light->_MatDiffuse[side], light->Diffuse, mat->Diffuse );
|
||||
|
|
@ -1323,5 +1323,3 @@ _mesa_compute_light_positions( GLcontext *ctx )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: light.h,v 1.11 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: light.h,v 1.12 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -120,4 +120,3 @@ extern void _mesa_update_color_material( GLcontext *ctx,
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: lines.c,v 1.28 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: lines.c,v 1.29 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -51,17 +51,17 @@ _mesa_LineWidth( GLfloat width )
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->Line.Width == width)
|
||||
if (ctx->Line.Width == width)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_LINE);
|
||||
ctx->Line.Width = width;
|
||||
ctx->Line._Width = CLAMP(width,
|
||||
ctx->Line._Width = CLAMP(width,
|
||||
ctx->Const.MinLineWidth,
|
||||
ctx->Const.MaxLineWidth);
|
||||
|
||||
|
||||
if (width != 1.0)
|
||||
if (width != 1.0)
|
||||
ctx->_TriangleCaps |= DD_LINE_WIDTH;
|
||||
else
|
||||
ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
|
||||
|
|
@ -91,5 +91,3 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
|
|||
if (ctx->Driver.LineStipple)
|
||||
ctx->Driver.LineStipple( ctx, factor, pattern );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: lines.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: lines.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: macros.h,v 1.18 2001/01/24 00:04:58 brianp Exp $ */
|
||||
/* $Id: macros.h,v 1.19 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
#define TEST_BITS(WORD, BITS) ((WORD) & (BITS))
|
||||
|
||||
|
||||
/* Stepping a GLfloat pointer by a byte stride
|
||||
/* Stepping a GLfloat pointer by a byte stride
|
||||
*/
|
||||
#define STRIDE_F(p, i) (p = (GLfloat *)((GLubyte *)p + i))
|
||||
#define STRIDE_UI(p, i) (p = (GLuint *)((GLubyte *)p + i))
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
(a)[2] == (b)[2])
|
||||
|
||||
#if defined(__i386__)
|
||||
#define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC))
|
||||
#define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC))
|
||||
#else
|
||||
#define TEST_EQ_4UBV(DST, SRC) TEST_EQ_4V(DST, SRC)
|
||||
#endif
|
||||
|
|
@ -169,7 +169,7 @@ do { \
|
|||
case 2: (DST)[1] = (SRC)[1]; \
|
||||
case 1: (DST)[0] = (SRC)[0]; \
|
||||
} \
|
||||
} while(0)
|
||||
} while(0)
|
||||
|
||||
#define COPY_CLEAN_4V(DST, SZ, SRC) \
|
||||
do { \
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: matrix.h,v 1.11 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: matrix.h,v 1.12 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: pixel.c,v 1.26 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: pixel.c,v 1.27 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -75,13 +75,13 @@ _mesa_PixelStorei( GLenum pname, GLint param )
|
|||
|
||||
switch (pname) {
|
||||
case GL_PACK_SWAP_BYTES:
|
||||
if (param == (GLint)ctx->Pack.SwapBytes)
|
||||
if (param == (GLint)ctx->Pack.SwapBytes)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
|
||||
ctx->Pack.SwapBytes = param ? GL_TRUE : GL_FALSE;
|
||||
break;
|
||||
case GL_PACK_LSB_FIRST:
|
||||
if (param == (GLint)ctx->Pack.LsbFirst)
|
||||
if (param == (GLint)ctx->Pack.LsbFirst)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
|
||||
ctx->Pack.LsbFirst = param ? GL_TRUE : GL_FALSE;
|
||||
|
|
@ -147,7 +147,7 @@ _mesa_PixelStorei( GLenum pname, GLint param )
|
|||
ctx->Pack.Alignment = param;
|
||||
break;
|
||||
case GL_UNPACK_SWAP_BYTES:
|
||||
if (param == (GLint)ctx->Unpack.SwapBytes)
|
||||
if (param == (GLint)ctx->Unpack.SwapBytes)
|
||||
return;
|
||||
if ((GLint)ctx->Unpack.SwapBytes == param)
|
||||
return;
|
||||
|
|
@ -155,7 +155,7 @@ _mesa_PixelStorei( GLenum pname, GLint param )
|
|||
ctx->Unpack.SwapBytes = param ? GL_TRUE : GL_FALSE;
|
||||
break;
|
||||
case GL_UNPACK_LSB_FIRST:
|
||||
if (param == (GLint)ctx->Unpack.LsbFirst)
|
||||
if (param == (GLint)ctx->Unpack.LsbFirst)
|
||||
return;
|
||||
if ((GLint)ctx->Unpack.LsbFirst == param)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: pixel.h,v 1.9 2000/12/13 00:46:21 brianp Exp $ */
|
||||
/* $Id: pixel.h,v 1.10 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: points.c,v 1.29 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: points.c,v 1.30 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.4
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -50,12 +50,12 @@ _mesa_PointSize( GLfloat size )
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->Point.Size == size)
|
||||
if (ctx->Point.Size == size)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_POINT);
|
||||
ctx->Point.Size = size;
|
||||
ctx->Point._Size = CLAMP(size,
|
||||
ctx->Point._Size = CLAMP(size,
|
||||
ctx->Const.MinPointSize,
|
||||
ctx->Const.MaxPointSize);
|
||||
|
||||
|
|
@ -146,4 +146,3 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
|
|||
if (ctx->Driver.PointParameterfv)
|
||||
(*ctx->Driver.PointParameterfv)(ctx, pname, params);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: points.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: points.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: polygon.c,v 1.19 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: polygon.c,v 1.20 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -137,7 +137,7 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
|
|||
}
|
||||
|
||||
ctx->_TriangleCaps &= ~DD_TRI_UNFILLED;
|
||||
if (ctx->Polygon.FrontMode!=GL_FILL || ctx->Polygon.BackMode!=GL_FILL)
|
||||
if (ctx->Polygon.FrontMode!=GL_FILL || ctx->Polygon.BackMode!=GL_FILL)
|
||||
ctx->_TriangleCaps |= DD_TRI_UNFILLED;
|
||||
|
||||
if (ctx->Driver.PolygonMode) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: polygon.h,v 1.3 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: polygon.h,v 1.4 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -55,4 +55,3 @@ _mesa_GetPolygonStipple( GLubyte *mask );
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rastpos.c,v 1.21 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: rastpos.c,v 1.22 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -128,10 +128,10 @@ shade_rastpos(GLcontext *ctx,
|
|||
}
|
||||
else {
|
||||
GLfloat d;
|
||||
|
||||
|
||||
SUB_3V(VP, light->_Position, vertex);
|
||||
d = LEN_3FV( VP );
|
||||
|
||||
|
||||
if ( d > 1e-6) {
|
||||
GLfloat invd = 1.0F / d;
|
||||
SELF_SCALE_SCALAR_3V(VP, invd);
|
||||
|
|
@ -139,10 +139,10 @@ shade_rastpos(GLcontext *ctx,
|
|||
attenuation = 1.0F / (light->ConstantAttenuation + d *
|
||||
(light->LinearAttenuation + d *
|
||||
light->QuadraticAttenuation));
|
||||
|
||||
|
||||
if (light->_Flags & LIGHT_SPOT) {
|
||||
GLfloat PV_dot_dir = - DOT3(VP, light->_NormDirection);
|
||||
|
||||
|
||||
if (PV_dot_dir<light->_CosCutoff) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -188,7 +188,7 @@ shade_rastpos(GLcontext *ctx,
|
|||
h = light->_h_inf_norm;
|
||||
normalized = 1;
|
||||
}
|
||||
|
||||
|
||||
n_dot_h = DOT3(normal, h);
|
||||
|
||||
if (n_dot_h > 0.0F) {
|
||||
|
|
@ -201,7 +201,7 @@ shade_rastpos(GLcontext *ctx,
|
|||
n_dot_h /= LEN_SQUARED_3FV( h );
|
||||
shininess *= .5;
|
||||
}
|
||||
|
||||
|
||||
GET_SHINE_TAB_ENTRY( ctx->_ShineTable[0], n_dot_h, spec_coef );
|
||||
|
||||
if (spec_coef > 1.0e-10) {
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: rastpos.h,v 1.2 1999/11/11 01:22:27 brianp Exp $ */
|
||||
/* $Id: rastpos.h,v 1.3 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -106,4 +106,3 @@ _mesa_RasterPos4sv(const GLshort *v);
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
/* $Id: simple_list.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
|
||||
/* $Id: simple_list.h,v 1.2 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.1
|
||||
*
|
||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
* (C) 1997, Keith Whitwell
|
||||
*
|
||||
* Intended to work with a list sentinal which is created as an empty
|
||||
* list. Insert & delete are O(1).
|
||||
* list. Insert & delete are O(1).
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -96,4 +96,3 @@ do { \
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: state.c,v 1.60 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: state.c,v 1.61 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -566,14 +566,14 @@ update_tnl_spaces( GLcontext *ctx, GLuint oldneedeyecoords )
|
|||
GLuint new_state = ctx->NewState;
|
||||
|
||||
/* Recalculate that same state only if it has been invalidated
|
||||
* by other statechanges.
|
||||
* by other statechanges.
|
||||
*/
|
||||
if (new_state & _NEW_MODELVIEW)
|
||||
update_modelview_scale(ctx);
|
||||
|
||||
if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION))
|
||||
calculate_model_project_matrix(ctx);
|
||||
|
||||
|
||||
if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW))
|
||||
_mesa_compute_light_positions( ctx );
|
||||
}
|
||||
|
|
@ -613,7 +613,7 @@ static void
|
|||
update_projection( GLcontext *ctx )
|
||||
{
|
||||
_math_matrix_analyse( &ctx->ProjectionMatrix );
|
||||
|
||||
|
||||
/* Recompute clip plane positions in clipspace. This is also done
|
||||
* in _mesa_ClipPlane().
|
||||
*/
|
||||
|
|
@ -865,7 +865,7 @@ update_texture_state( GLcontext *ctx )
|
|||
* state references this value, and must be treated with care to
|
||||
* ensure that updates are done correctly. All state dependent on
|
||||
* _NeedEyeCoords is calculated from within _mesa_update_tnl_spaces(),
|
||||
* and from nowhere else.
|
||||
* and from nowhere else.
|
||||
*/
|
||||
void _mesa_update_state( GLcontext *ctx )
|
||||
{
|
||||
|
|
@ -926,7 +926,7 @@ void _mesa_update_state( GLcontext *ctx )
|
|||
* normal transform.
|
||||
*
|
||||
* If the lighting space hasn't changed, may still need to recompute
|
||||
* light positions & normal transforms for other reasons.
|
||||
* light positions & normal transforms for other reasons.
|
||||
*/
|
||||
if (new_state & (_NEW_MODELVIEW |
|
||||
_NEW_PROJECTION |
|
||||
|
|
@ -948,12 +948,12 @@ void _mesa_update_state( GLcontext *ctx )
|
|||
ctx->Array.NewState = 0;
|
||||
|
||||
/* At this point we can do some assertions to be sure the required
|
||||
* device driver function pointers are all initialized.
|
||||
* device driver function pointers are all initialized.
|
||||
*
|
||||
* KW: Moved the some of these asserts to t_vb_render.c, as they
|
||||
* are strictly only required for that stage. The Driver struct
|
||||
* should probably be split; the read/write span/pixels functions
|
||||
* should be referenced only from swrast, for instance.
|
||||
* should be referenced only from swrast, for instance.
|
||||
*/
|
||||
ASSERT(ctx->Driver.GetString);
|
||||
ASSERT(ctx->Driver.UpdateState);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: state.h,v 1.6 2001/03/03 20:33:27 brianp Exp $ */
|
||||
/* $Id: state.h,v 1.7 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: stencil.c,v 1.25 2001/03/03 20:33:28 brianp Exp $ */
|
||||
/* $Id: stencil.c,v 1.26 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -46,7 +46,7 @@ _mesa_ClearStencil( GLint s )
|
|||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
|
||||
if (ctx->Stencil.Clear == (GLstencil) s)
|
||||
return;
|
||||
|
||||
|
|
@ -197,4 +197,3 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
|
|||
(*ctx->Driver.StencilOp)(ctx, fail, zfail, zpass);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: stencil.h,v 1.8 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: stencil.h,v 1.9 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: teximage.c,v 1.83 2001/03/07 05:06:12 brianp Exp $ */
|
||||
/* $Id: teximage.c,v 1.84 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: teximage.h,v 1.16 2001/02/06 21:42:48 brianp Exp $ */
|
||||
/* $Id: teximage.h,v 1.17 2001/03/12 00:48:38 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -188,4 +188,3 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img);
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: texobj.c,v 1.43 2001/03/08 15:23:46 brianp Exp $ */
|
||||
/* $Id: texobj.c,v 1.44 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
* Return: pointer to new texture object
|
||||
*/
|
||||
struct gl_texture_object *
|
||||
_mesa_alloc_texture_object( struct gl_shared_state *shared,
|
||||
_mesa_alloc_texture_object( struct gl_shared_state *shared,
|
||||
GLuint name, GLuint dimensions )
|
||||
{
|
||||
struct gl_texture_object *obj;
|
||||
|
|
@ -609,7 +609,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
|||
|
||||
newTexObj->RefCount++;
|
||||
|
||||
|
||||
|
||||
/* do the actual binding, but first flush outstanding vertices:
|
||||
*/
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
|
|
@ -743,4 +743,3 @@ _mesa_IsTexture( GLuint texture )
|
|||
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
|
||||
return texture > 0 && _mesa_HashLookup(ctx->Shared->TexObjects, texture);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: texobj.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */
|
||||
/* $Id: texobj.h,v 1.6 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: texstate.h,v 1.6 2001/02/06 21:42:48 brianp Exp $ */
|
||||
/* $Id: texstate.h,v 1.7 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -123,4 +123,3 @@ _mesa_ClientActiveTextureARB( GLenum target );
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: texstore.c,v 1.10 2001/03/07 05:06:12 brianp Exp $ */
|
||||
/* $Id: texstore.c,v 1.11 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -1450,4 +1450,3 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
|
|||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: texutil.c,v 1.13 2001/03/07 05:06:12 brianp Exp $ */
|
||||
/* $Id: texutil.c,v 1.14 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.4
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: texutil.h,v 1.7 2001/01/24 00:04:58 brianp Exp $ */
|
||||
/* $Id: texutil.h,v 1.8 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -90,4 +90,3 @@ _mesa_set_teximage_component_sizes(MesaIntTexFormat mesaFormat,
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: varray.c,v 1.38 2001/03/07 05:06:12 brianp Exp $ */
|
||||
/* $Id: varray.c,v 1.39 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -711,7 +711,7 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
|
|||
count <= (GLint) ctx->Const.MaxArrayLockSize) {
|
||||
ctx->Array.LockFirst = first;
|
||||
ctx->Array.LockCount = count;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ctx->Array.LockFirst = 0;
|
||||
ctx->Array.LockCount = 0;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/* $Id: varray.h,v 1.11 2000/11/24 10:25:06 keithw Exp $ */
|
||||
/* $Id: varray.h,v 1.12 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.3
|
||||
* Version: 3.5
|
||||
*
|
||||
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: vtxfmt.c,v 1.4 2001/03/11 23:55:19 gareth Exp $ */
|
||||
/* $Id: vtxfmt.c,v 1.5 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
|
@ -154,6 +154,7 @@ void _mesa_init_exec_vtxfmt( GLcontext *ctx )
|
|||
install_vtxfmt( ctx->Exec, &neutral_vtxfmt );
|
||||
}
|
||||
|
||||
|
||||
void _mesa_install_exec_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
|
||||
{
|
||||
ctx->TnlModule.Current = vfmt;
|
||||
|
|
@ -169,6 +170,7 @@ void _mesa_install_save_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
|
|||
_mesa_loopback_prefer_float( ctx->Save, vfmt->prefer_float_colors );
|
||||
}
|
||||
|
||||
|
||||
void _mesa_restore_exec_vtxfmt( GLcontext *ctx )
|
||||
{
|
||||
struct gl_tnl_module *tnl = &(ctx->TnlModule);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: vtxfmt.h,v 1.3 2001/03/11 23:49:20 gareth Exp $ */
|
||||
/* $Id: vtxfmt.h,v 1.4 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Authors:
|
||||
* Keith Whitwell <keithw@valinux.com>
|
||||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: vtxfmt_tmp.h,v 1.3 2001/03/11 18:49:11 gareth Exp $ */
|
||||
/* $Id: vtxfmt_tmp.h,v 1.4 2001/03/12 00:48:39 gareth Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Author:
|
||||
* Authors:
|
||||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue