-/* $Id: fakeglx.c,v 1.39 2000/11/10 17:23:03 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.40 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "config.h"
#include "macros.h"
#include "mmath.h"
-#include "types.h"
+#include "mtypes.h"
#include "xfonts.h"
#include "xmesaP.h"
parselist++;
parselist++;
break;
-
+
/*
* GLX_EXT_visual_info extension
*/
-/* $Id: xm_api.c,v 1.9 2000/11/17 21:01:48 brianp Exp $ */
+/* $Id: xm_api.c,v 1.10 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#include "glthread.h"
#include "matrix.h"
#include "mem.h"
-#include "types.h"
+#include "mtypes.h"
#ifdef HAVE_CONFIG_H
#include "conf.h"
#endif
176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223
-}
+}
};
subColor.pixel = (unsigned long) bestmatch;
subColor.red = ctable[bestmatch].red;
subColor.green = ctable[bestmatch].green;
- subColor.blue = ctable[bestmatch].blue;
+ subColor.blue = ctable[bestmatch].blue;
subColor.flags = DoRed | DoGreen | DoBlue;
*alloced = 0;
}
prevBuffer = find_xmesa_buffer(v->display, cmap, buffer);
if (prevBuffer &&
- (buffer->xm_visual->gl_visual->RGBAflag ==
+ (buffer->xm_visual->gl_visual->RGBAflag ==
prevBuffer->xm_visual->gl_visual->RGBAflag)) {
/* Copy colormap stuff from previous XMesaBuffer which uses same
* X colormap. Do this to avoid time spent in noFaultXAllocColor.
prevBuffer = find_xmesa_buffer(v->display, cmap, buffer);
if (prevBuffer &&
- (buffer->xm_visual->gl_visual->RGBAflag ==
+ (buffer->xm_visual->gl_visual->RGBAflag ==
prevBuffer->xm_visual->gl_visual->RGBAflag)) {
/* Copy colormap stuff from previous, matching XMesaBuffer.
* Do this to avoid time spent in noFaultXAllocColor.
int i;
double g;
- g = 1.0 / v->RedGamma;
- for (i=0; i<256; i++) {
+ g = 1.0 / v->RedGamma;
+ for (i=0; i<256; i++) {
GLint red = (GLint) (255.0 * pow( hpcr_rgbTbl[0][i]/255.0, g ) + 0.5);
v->hpcr_rgbTbl[0][i] = CLAMP( red, 16, 239 );
}
xmesa_register_swrast_functions( ctx );
- /* Run the config file
+ /* Run the config file
*/
_mesa_context_initialize( ctx );
attribs[numAttribs++] = (int) c->gl_ctx;
}
attribs[numAttribs++] = FXMESA_NONE;
-
+
if ((hw = fxQueryHardware())==GR_SSTTYPE_VOODOO) {
b->FXctx = fxMesaCreateBestContext(0, b->width, b->height, attribs);
if ((v->undithered_pf!=PF_INDEX) && (b->backimage)) {
/* read row from 3Dfx frame buffer */
grLfbReadRegion( GR_BUFFER_FRONTBUFFER,
0, xmesa->xm_buffer->FXctx->height-(b->height-y),
- b->width, 1,
+ b->width, 1,
0,
pixbuf );
/* read row from 3Dfx frame buffer */
grLfbReadRegion( GR_BUFFER_FRONTBUFFER,
0, xmesa->xm_buffer->FXctx->height-(b->height-y),
- b->width, 1,
+ b->width, 1,
0,
pixbuf );
-/* $Id: xm_dd.c,v 1.6 2000/11/16 21:05:40 keithw Exp $ */
+/* $Id: xm_dd.c,v 1.7 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#include "state.h"
#include "depth.h"
#include "macros.h"
-#include "types.h"
+#include "mtypes.h"
#include "xmesaP.h"
#include "extensions.h"
#include "swrast/swrast.h"
}
else {
pixel = pixel | (pixel<<16);
- n = xmesa->xm_buffer->backimage->bytes_per_line
+ n = xmesa->xm_buffer->backimage->bytes_per_line
* xmesa->xm_buffer->height / 4;
do {
*ptr4++ = pixel;
n--;
} while (n!=0);
-
- if ((xmesa->xm_buffer->backimage->bytes_per_line *
+
+ if ((xmesa->xm_buffer->backimage->bytes_per_line *
xmesa->xm_buffer->height) & 0x2)
*(GLushort *)ptr4 = pixel & 0xffff;
}
break;
}
- xmesa_update_span_funcs(ctx);
+ xmesa_update_span_funcs(ctx);
}
ctx->Driver.GetBufferSize = get_buffer_size;
ctx->Driver.Flush = flush;
ctx->Driver.Finish = finish;
-
+
ctx->Driver.RenderStart = 0;
ctx->Driver.RenderFinish = _swrast_flush;
-/* $Id: xm_line.c,v 1.11 2000/11/19 23:10:26 brianp Exp $ */
+/* $Id: xm_line.c,v 1.12 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "glxheader.h"
#include "depth.h"
#include "macros.h"
-#include "types.h"
+#include "mtypes.h"
#include "xmesaP.h"
/* Internal swrast includes:
register int x, y;
const GLubyte *color = vert->color;
unsigned long pixel = xmesa_color_to_pixel( xmesa,
- color[0], color[1],
- color[2], color[3],
+ color[0], color[1],
+ color[2], color[3],
xmesa->pixelformat);
XMesaSetForeground( dpy, gc, pixel );
x = (GLint) vert->win[0];
SWcontext *swrast = SWRAST_CONTEXT(ctx);
if (ctx->RenderMode == GL_RENDER
- && ctx->Point.Size == 1.0F && !ctx->Point.SmoothFlag
+ && ctx->Point.Size == 1.0F && !ctx->Point.SmoothFlag
&& swrast->_RasterMask == 0
&& !ctx->Texture._ReallyEnabled
&& xmesa->xm_buffer->buffer != XIMAGE) {
swrast->Point = draw_points_ANY_pixmap;
}
- else {
+ else {
_swrast_choose_point( ctx );
}
}
/* Override for the swrast line-selection function. Try to use one
* of our internal line functions, otherwise fall back to the
- * standard swrast functions.
+ * standard swrast functions.
*/
void xmesa_choose_line( GLcontext *ctx )
{
_SWRAST_NEW_RASTERMASK)
-/* Extend the software rasterizer with our line/point/triangle
+/* Extend the software rasterizer with our line/point/triangle
* functions.
*/
void xmesa_register_swrast_functions( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT( ctx );
-
+
swrast->choose_point = xmesa_choose_point;
swrast->choose_line = xmesa_choose_line;
swrast->choose_triangle = xmesa_choose_triangle;
-
+
swrast->invalidate_point |= XMESA_NEW_POINT;
swrast->invalidate_line |= XMESA_NEW_LINE;
swrast->invalidate_triangle |= XMESA_NEW_TRIANGLE;
-/* $Id: xm_span.c,v 1.3 2000/11/16 21:05:40 keithw Exp $ */
+/* $Id: xm_span.c,v 1.4 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#include "state.h"
#include "depth.h"
#include "macros.h"
-#include "types.h"
+#include "mtypes.h"
#include "xmesaP.h"
#include "extensions.h"
xmesa->clearcolor[2] = b;
xmesa->clearcolor[3] = a;
-
+
if (0x0==r && 0x0==g && 0x0==b) {
/* black is black */
for (i=0; i<16; i++) {
}
}
/* change tile pixmap content */
- XMesaPutImage(xmesa->display,
- (XMesaDrawable)xmesa->xm_visual->hpcr_clear_pixmap,
- xmesa->xm_buffer->cleargc,
+ XMesaPutImage(xmesa->display,
+ (XMesaDrawable)xmesa->xm_visual->hpcr_clear_pixmap,
+ xmesa->xm_buffer->cleargc,
xmesa->xm_visual->hpcr_clear_ximage, 0, 0, 0, 0, 16, 2);
}
-/* $Id: xm_tri.c,v 1.11 2000/11/19 23:10:26 brianp Exp $ */
+/* $Id: xm_tri.c,v 1.12 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "glxheader.h"
#include "depth.h"
#include "macros.h"
-#include "types.h"
+#include "mtypes.h"
#include "xmesaP.h"
/* Internal swrast includes:
/*
* XImage, smooth, depth-buffered, 8-bit PF_LOOKUP triangle.
*/
-static void smooth_LOOKUP8_z_triangle( GLcontext *ctx,
+static void smooth_LOOKUP8_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, depth-buffered, 8-bit PF_HPCR triangle.
*/
-static void smooth_HPCR_z_triangle( GLcontext *ctx,
+static void smooth_HPCR_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, PF_8A8B8G8R triangle.
*/
-static void flat_8A8B8G8R_z_triangle( GLcontext *ctx,
+static void flat_8A8B8G8R_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, PF_8R8G8B triangle.
*/
-static void flat_8R8G8B_z_triangle( GLcontext *ctx,
+static void flat_8R8G8B_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, PF_8R8G8B24 triangle.
*/
-static void flat_8R8G8B24_z_triangle( GLcontext *ctx,
+static void flat_8R8G8B24_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, PF_TRUEDITHER triangle.
*/
-static void flat_TRUEDITHER_z_triangle( GLcontext *ctx,
+static void flat_TRUEDITHER_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, PF_5R6G5B triangle.
*/
-static void flat_5R6G5B_z_triangle( GLcontext *ctx,
+static void flat_5R6G5B_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, PF_DITHER_5R6G5B triangle.
*/
-static void flat_DITHER_5R6G5B_z_triangle( GLcontext *ctx,
+static void flat_DITHER_5R6G5B_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, 8-bit PF_DITHER triangle.
*/
-static void flat_DITHER8_z_triangle( GLcontext *ctx,
+static void flat_DITHER8_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, PF_DITHER triangle.
*/
-static void flat_DITHER_z_triangle( GLcontext *ctx,
+static void flat_DITHER_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, 8-bit PF_HPCR triangle.
*/
-static void flat_HPCR_z_triangle( GLcontext *ctx,
+static void flat_HPCR_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, depth-buffered, 8-bit PF_LOOKUP triangle.
*/
-static void flat_LOOKUP8_z_triangle( GLcontext *ctx,
+static void flat_LOOKUP8_z_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_TRUECOLOR triangle.
*/
-static void smooth_TRUECOLOR_triangle( GLcontext *ctx,
+static void smooth_TRUECOLOR_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_8A8B8G8R triangle.
*/
-static void smooth_8A8B8G8R_triangle( GLcontext *ctx,
+static void smooth_8A8B8G8R_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_8R8G8B triangle.
*/
-static void smooth_8R8G8B_triangle( GLcontext *ctx,
+static void smooth_8R8G8B_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_8R8G8B triangle.
*/
-static void smooth_8R8G8B24_triangle( GLcontext *ctx,
+static void smooth_8R8G8B24_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_TRUEDITHER triangle.
*/
-static void smooth_TRUEDITHER_triangle( GLcontext *ctx,
+static void smooth_TRUEDITHER_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_5R6G5B triangle.
*/
-static void smooth_5R6G5B_triangle( GLcontext *ctx,
+static void smooth_5R6G5B_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_DITHER_5R6G5B triangle.
*/
-static void smooth_DITHER_5R6G5B_triangle( GLcontext *ctx,
+static void smooth_DITHER_5R6G5B_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, 8-bit PF_DITHER triangle.
*/
-static void smooth_DITHER8_triangle( GLcontext *ctx,
+static void smooth_DITHER8_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, PF_DITHER triangle.
*/
-static void smooth_DITHER_triangle( GLcontext *ctx,
+static void smooth_DITHER_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, 8-bit PF_LOOKUP triangle.
*/
-static void smooth_LOOKUP8_triangle( GLcontext *ctx,
+static void smooth_LOOKUP8_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, smooth, NON-depth-buffered, 8-bit PF_HPCR triangle.
*/
-static void smooth_HPCR_triangle( GLcontext *ctx,
+static void smooth_HPCR_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_TRUECOLOR triangle.
*/
-static void flat_TRUECOLOR_triangle( GLcontext *ctx,
+static void flat_TRUECOLOR_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_8A8B8G8R triangle.
*/
-static void flat_8A8B8G8R_triangle( GLcontext *ctx,
+static void flat_8A8B8G8R_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_8R8G8B triangle.
*/
-static void flat_8R8G8B_triangle( GLcontext *ctx,
+static void flat_8R8G8B_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_8R8G8B24 triangle.
*/
-static void flat_8R8G8B24_triangle( GLcontext *ctx,
+static void flat_8R8G8B24_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_TRUEDITHER triangle.
*/
-static void flat_TRUEDITHER_triangle( GLcontext *ctx,
+static void flat_TRUEDITHER_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_5R6G5B triangle.
*/
-static void flat_5R6G5B_triangle( GLcontext *ctx,
+static void flat_5R6G5B_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_DITHER_5R6G5B triangle.
*/
-static void flat_DITHER_5R6G5B_triangle( GLcontext *ctx,
+static void flat_DITHER_5R6G5B_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, 8-bit PF_DITHER triangle.
*/
-static void flat_DITHER8_triangle( GLcontext *ctx,
+static void flat_DITHER8_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, PF_DITHER triangle.
*/
-static void flat_DITHER_triangle( GLcontext *ctx,
+static void flat_DITHER_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, 8-bit PF_HPCR triangle.
*/
-static void flat_HPCR_triangle( GLcontext *ctx,
+static void flat_HPCR_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/*
* XImage, flat, NON-depth-buffered, 8-bit PF_LOOKUP triangle.
*/
-static void flat_LOOKUP8_triangle( GLcontext *ctx,
+static void flat_LOOKUP8_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
/* Override for the swrast tri-selection function. Try to use one
* of our internal tri functions, otherwise fall back to the
- * standard swrast functions.
+ * standard swrast functions.
*/
void xmesa_choose_triangle( GLcontext *ctx )
{
-/* $Id: glapi.c,v 1.47 2000/10/27 18:31:22 brianp Exp $ */
+/* $Id: glapi.c,v 1.48 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
#include "glthread.h"
#if defined(MESA_TRACE)
-#include "types.h"
+#include "mtypes.h"
#endif
/* This is used when thread safety is disabled */
{ "glCopyTexSubImage1DEXT", NAME(glCopyTexSubImage1DEXT), _gloffset_CopyTexSubImage1D },
{ "glCopyTexSubImage2DEXT", NAME(glCopyTexSubImage2DEXT), _gloffset_CopyTexSubImage2D },
#undef NAME
-
+
/* 11. GL_EXT_histogram */
#ifdef GL_EXT_histogram
#define NAME(X) (GLvoid *) X
{ "glGetSeparableFilterEXT", NAME(glGetSeparableFilterEXT), _gloffset_GetSeparableFilterEXT },
{ "glSeparableFilter2DEXT", NAME(glSeparableFilter2DEXT), _gloffset_SeparableFilter2D },
#undef NAME
-
+
/* 14. GL_SGI_color_table */
#ifdef GL_SGI_color_table
#define NAME(X) (GLvoid *) X
-/* $Id: glthread.h,v 1.6 2000/11/17 11:00:56 joukj Exp $ */
+/* $Id: glthread.h,v 1.7 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
*/
/*
- * If this file is accidentally included by a non-threaded build,
+ * If this file is accidentally included by a non-threaded build,
* it should not cause the build to fail, or otherwise cause problems.
* In general, it should only be included when needed however.
*/
-#ifdef VMS
-# if defined(PTHREADS)
-#include "types.h"
-#endif
-#endif
-
#ifndef GLTHREAD_H
#define GLTHREAD_H
/*
- * Solaris threads. Use only up to Solaris 2.4.
+ * Solaris threads. Use only up to Solaris 2.4.
* Solaris 2.5 and higher provide POSIX threads.
- * Be sure to compile with -mt on the Solaris compilers, or
+ * Be sure to compile with -mt on the Solaris compilers, or
* use -D_REENTRANT if using gcc.
*/
#ifdef SOLARIS_THREADS
/*
- * Windows threads. Should work with Windows NT and 95.
+ * Windows threads. Should work with Windows NT and 95.
* IMPORTANT: Link with multithreaded runtime library when THREADS are
* used!
*/
/*
- * Platform independent thread specific data API.
+ * Platform independent thread specific data API.
*/
extern unsigned long
-/* $Id: accum.c,v 1.31 2000/10/31 18:09:44 keithw Exp $ */
+/* $Id: accum.c,v 1.32 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "macros.h"
#include "mem.h"
#include "state.h"
-#include "types.h"
+#include "mtypes.h"
#include "swrast/swrast.h"
#endif
{
GET_CURRENT_CONTEXT(ctx);
GLuint xpos, ypos, width, height;
-
+
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glAccum");
if (ctx->Visual.AccumRedBits == 0 || ctx->DrawBuffer != ctx->ReadBuffer) {
-/* $Id: accum.h,v 1.4 2000/10/31 18:09:44 keithw Exp $ */
+/* $Id: accum.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
- *
+ *
* Copyright (C) 1999 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
#define ACCUM_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: attrib.c,v 1.35 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: attrib.c,v 1.36 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "mem.h"
#include "simple_list.h"
#include "texstate.h"
-#include "types.h"
+#include "mtypes.h"
#endif
case GL_POLYGON_STIPPLE_BIT:
MEMCPY( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) );
ctx->NewState |= _NEW_POLYGONSTIPPLE;
- if (ctx->Driver.PolygonStipple)
+ if (ctx->Driver.PolygonStipple)
ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data );
break;
case GL_SCISSOR_BIT:
}
}
break;
- case GL_VIEWPORT_BIT:
+ case GL_VIEWPORT_BIT:
{
- struct gl_viewport_attrib *v =
+ struct gl_viewport_attrib *v =
(struct gl_viewport_attrib *)attr->data;
ctx->NewState |= _NEW_VIEWPORT;
-/* $Id: attrib.h,v 1.3 2000/02/02 22:03:31 brianp Exp $ */
+/* $Id: attrib.h,v 1.4 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define ATTRIB_h
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: blend.c,v 1.25 2000/11/05 18:40:57 keithw Exp $ */
+/* $Id: blend.c,v 1.26 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "context.h"
#include "enums.h"
#include "macros.h"
-#include "types.h"
+#include "mtypes.h"
#endif
}
ctx->NewState |= _NEW_COLOR;
-
+
if (ctx->Driver.BlendEquation)
ctx->Driver.BlendEquation( ctx, mode );
}
-/* $Id: blend.h,v 1.6 2000/10/31 18:09:44 keithw Exp $ */
+/* $Id: blend.h,v 1.7 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define BLEND_H
-#include "types.h"
+#include "mtypes.h"
extern void
_mesa_BlendFunc( GLenum sfactor, GLenum dfactor );
-/* $Id: buffers.c,v 1.19 2000/11/13 20:02:56 keithw Exp $ */
+/* $Id: buffers.c,v 1.20 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "mem.h"
#include "stencil.h"
#include "state.h"
-#include "types.h"
+#include "mtypes.h"
#include "swrast/swrast.h"
#endif
-void
+void
_mesa_Clear( GLbitfield mask )
{
GET_CURRENT_CONTEXT(ctx);
-/* $Id: buffers.h,v 1.1 2000/02/02 19:15:03 brianp Exp $ */
+/* $Id: buffers.h,v 1.2 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define BUFFERS_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: clip.c,v 1.15 2000/11/16 21:05:34 keithw Exp $ */
+/* $Id: clip.c,v 1.16 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#include "context.h"
#include "macros.h"
#include "mmath.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_xform.h"
#include "math/m_matrix.h"
* clipping now takes place. The clip-space equations are recalculated
* whenever the projection matrix changes.
*/
- if (ctx->ModelView.flags & MAT_DIRTY)
+ if (ctx->ModelView.flags & MAT_DIRTY)
_math_matrix_analyze( &ctx->ModelView );
gl_transform_vector( ctx->Transform.EyeUserPlane[p], equation,
* code in gl_update_state().
*/
if (ctx->Transform.ClipEnabled[p]) {
- if (ctx->ProjectionMatrix.flags & MAT_DIRTY)
+ if (ctx->ProjectionMatrix.flags & MAT_DIRTY)
_math_matrix_analyze( &ctx->ProjectionMatrix );
-
- gl_transform_vector( ctx->Transform._ClipUserPlane[p],
- ctx->Transform.EyeUserPlane[p],
+
+ gl_transform_vector( ctx->Transform._ClipUserPlane[p],
+ ctx->Transform.EyeUserPlane[p],
ctx->ProjectionMatrix.inv );
}
-/* $Id: clip.h,v 1.4 2000/11/16 21:05:34 keithw Exp $ */
+/* $Id: clip.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
- *
+ *
* Copyright (C) 1999 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
#ifndef CLIP_H
#define CLIP_H
-#include "types.h"
+#include "mtypes.h"
extern void _mesa_ClipPlane( GLenum plane, const GLdouble *equation );
-/* $Id: colortab.h,v 1.7 2000/04/17 17:57:04 brianp Exp $ */
+/* $Id: colortab.h,v 1.8 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define COLORTAB_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: context.c,v 1.107 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: context.c,v 1.108 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
#include "teximage.h"
#include "texobj.h"
#include "texture.h"
-#include "types.h"
+#include "mtypes.h"
#include "varray.h"
#include "math/m_translate.h"
#ifndef MESA_VERBOSE
-int MESA_VERBOSE = 0
+int MESA_VERBOSE = 0
/* | VERBOSE_PIPELINE */
/* | VERBOSE_IMMEDIATE */
/* | VERBOSE_VARRAY */
#endif
#ifndef MESA_DEBUG_FLAGS
-int MESA_DEBUG_FLAGS = 0
+int MESA_DEBUG_FLAGS = 0
/* | DEBUG_ALWAYS_FLUSH */
;
#endif
ctx->Visual = *visual;
ctx->DrawBuffer = NULL;
ctx->ReadBuffer = NULL;
-
+
if (share_list) {
/* share the group of display lists of another context */
ctx->Shared = share_list->Shared;
static void print_info( void )
{
- fprintf(stderr, "Mesa GL_VERSION = %s\n",
+ fprintf(stderr, "Mesa GL_VERSION = %s\n",
(char *) _mesa_GetString(GL_VERSION));
- fprintf(stderr, "Mesa GL_RENDERER = %s\n",
+ fprintf(stderr, "Mesa GL_RENDERER = %s\n",
(char *) _mesa_GetString(GL_RENDERER));
- fprintf(stderr, "Mesa GL_VENDOR = %s\n",
+ fprintf(stderr, "Mesa GL_VENDOR = %s\n",
(char *) _mesa_GetString(GL_VENDOR));
- fprintf(stderr, "Mesa GL_EXTENSIONS = %s\n",
+ fprintf(stderr, "Mesa GL_EXTENSIONS = %s\n",
(char *) _mesa_GetString(GL_EXTENSIONS));
#if defined(THREADS)
fprintf(stderr, "Mesa thread-safe: YES\n");
_mesa_make_current2( GLcontext *newCtx, GLframebuffer *drawBuffer,
GLframebuffer *readBuffer )
{
- if (MESA_VERBOSE)
+ if (MESA_VERBOSE)
fprintf(stderr, "_mesa_make_current2()\n");
/* We call this function periodically (just here for now) in
/* gl_update_state( newCtx ); */
}
- if (newCtx->Driver.MakeCurrent)
+ if (newCtx->Driver.MakeCurrent)
newCtx->Driver.MakeCurrent( newCtx, drawBuffer, readBuffer );
/* We can use this to help debug user's problems. Tell them to set
-/* $Id: context.h,v 1.21 2000/11/16 21:05:34 keithw Exp $ */
+/* $Id: context.h,v 1.22 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#include "glapi.h"
-#include "types.h"
+#include "mtypes.h"
/*
-/* $Id: convolve.c,v 1.13 2000/11/21 23:26:13 brianp Exp $ */
+/* $Id: convolve.c,v 1.14 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
#include "convolve.h"
#include "context.h"
#include "image.h"
-#include "types.h"
+#include "mtypes.h"
#include "swrast/s_span.h" /* XXX SWRAST hack */
#endif
ctx->Separable2D.Filter[i * 4 + 3 + colStart] = a;
}
}
-
+
ctx->NewState |= _NEW_PIXEL;
}
-/* $Id: convolve.h,v 1.2 2000/08/23 14:31:25 brianp Exp $ */
+/* $Id: convolve.h,v 1.3 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
#define CONVOLVE_H
-#include "types.h"
+#include "mtypes.h"
extern void
-#include "types.h"
+#include "mtypes.h"
#include "debug.h"
void gl_print_state( const char *msg, GLuint state )
(flags & ENABLE_RESCALE) ? "rescale, " : "");
}
-void gl_print_tri_caps( const char *name, GLuint flags )
+void gl_print_tri_caps( const char *name, GLuint flags )
{
- fprintf(stderr,
+ fprintf(stderr,
"%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
name,
flags,
(flags & DD_LINE_SMOOTH) ? "line-smooth, " : "",
(flags & DD_LINE_STIPPLE) ? "line-stipple, " : "",
(flags & DD_LINE_WIDTH) ? "line-wide, " : "",
- (flags & DD_POINT_SMOOTH) ? "point-smooth, " : "",
- (flags & DD_POINT_SIZE) ? "point-size, " : "",
- (flags & DD_POINT_ATTEN) ? "point-atten, " : "",
- (flags & DD_LIGHTING_CULL) ? "lighting-cull, " : "",
+ (flags & DD_POINT_SMOOTH) ? "point-smooth, " : "",
+ (flags & DD_POINT_SIZE) ? "point-size, " : "",
+ (flags & DD_POINT_ATTEN) ? "point-atten, " : "",
+ (flags & DD_LIGHTING_CULL) ? "lighting-cull, " : "",
(flags & DD_TRI_CULL_FRONT_BACK) ? "cull-all, " : "",
(flags & DD_STENCIL) ? "stencil, " : ""
);
-/* $Id: depth.c,v 1.23 2000/11/05 18:40:57 keithw Exp $ */
+/* $Id: depth.c,v 1.24 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#include "depth.h"
#include "macros.h"
#include "mem.h"
-#include "types.h"
+#include "mtypes.h"
#endif
-/* $Id: depth.h,v 1.9 2000/10/31 18:09:44 keithw Exp $ */
+/* $Id: depth.h,v 1.10 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define DEPTH_H
-#include "types.h"
+#include "mtypes.h"
/*
-/* $Id: dlist.c,v 1.51 2000/11/16 21:05:34 keithw Exp $ */
+/* $Id: dlist.c,v 1.52 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#include "texobj.h"
#include "teximage.h"
#include "texstate.h"
-#include "types.h"
+#include "mtypes.h"
#include "varray.h"
#include "math/m_matrix.h"
*/
-/* How many nodes to allocate at a time:
+/* How many nodes to allocate at a time:
* - reduced now that we hold vertices etc. elsewhere.
*/
#define BLOCK_SIZE 64
}
}
}
-
+
_mesa_HashRemove(ctx->Shared->DisplayList, list);
}
*/
int
_mesa_alloc_opcode( GLcontext *ctx,
- GLuint sz,
+ GLuint sz,
void (*execute)( GLcontext *, void * ),
void (*destroy)( GLcontext *, void * ),
void (*print)( GLcontext *, void * ) )
-/* Mimic the old behaviour of alloc_instruction:
+/* Mimic the old behaviour of alloc_instruction:
* - sz is in units of sizeof(Node)
* - return value a pointer to sizeof(Node) before the actual
* usable data area.
}
-static void save_EvalMesh2(
+static void save_EvalMesh2(
GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
{
GET_CURRENT_CONTEXT(ctx);
{
save_Rectf(v1[0], v1[1], v2[0], v2[1]);
}
-
+
static void save_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
{
save_Rectf(x1, y1, x2, y2);
n[3].i = internalFormat;
n[4].i = (GLint) width;
n[5].i = (GLint) height;
- n[6].i = (GLint) depth;
+ n[6].i = (GLint) depth;
n[7].i = border;
n[8].e = format;
n[9].e = type;
}
-/* KW: Compile commands
- *
+/* KW: Compile commands
+ *
* Will appear in the list before the vertex buffer containing the
- * command that provoked the error. I don't see this as a problem.
+ * command that provoked the error. I don't see this as a problem.
*/
void gl_save_error( GLcontext *ctx, GLenum error, const char *s )
{
else {
switch (opcode) {
case OPCODE_ERROR:
- gl_error( ctx, n[1].e, (const char *) n[2].data );
+ gl_error( ctx, n[1].e, (const char *) n[2].data );
break;
case OPCODE_ACCUM:
(*ctx->Exec->Accum)( n[1].e, n[2].f );
params[0] = n[2].f;
params[1] = n[3].f;
params[2] = n[4].f;
- (*ctx->Exec->PointParameterfvEXT)( n[1].e, params );
+ (*ctx->Exec->PointParameterfvEXT)( n[1].e, params );
}
break;
case OPCODE_POLYGON_MODE:
if (MESA_VERBOSE&VERBOSE_API) {
fprintf(stderr, "glCallList %u\n", list);
- mesa_print_display_list( list );
+ mesa_print_display_list( list );
}
- save_compile_flag = ctx->CompileFlag;
+ save_compile_flag = ctx->CompileFlag;
ctx->CompileFlag = GL_FALSE;
-
+
FLUSH_TNL( ctx, (FLUSH_STORED_VERTICES | FLUSH_UPDATE_CURRENT) );
execute_list( ctx, list );
ctx->CompileFlag = save_compile_flag;
table->SeparableFilter2D = _mesa_SeparableFilter2D;
/* 2. GL_EXT_blend_color */
-#if 0
+#if 0
table->BlendColorEXT = save_BlendColorEXT;
#endif
fprintf(f,"Translate %g %g %g\n", n[1].f, n[2].f, n[3].f );
break;
case OPCODE_BIND_TEXTURE:
- fprintf(f,"BindTexture %s %d\n", gl_lookup_enum_by_nr(n[1].ui),
+ fprintf(f,"BindTexture %s %d\n", gl_lookup_enum_by_nr(n[1].ui),
n[2].ui);
break;
case OPCODE_SHADE_MODEL:
- fprintf(f,"ShadeModel %s\n", gl_lookup_enum_by_nr(n[1].ui));
+ fprintf(f,"ShadeModel %s\n", gl_lookup_enum_by_nr(n[1].ui));
break;
/*
-/* $Id: dlist.h,v 1.7 2000/11/16 21:05:34 keithw Exp $ */
+/* $Id: dlist.h,v 1.8 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define DLIST_H
-#include "types.h"
+#include "mtypes.h"
extern void gl_init_lists( void );
_mesa_alloc_instruction( GLcontext *ctx, int opcode, GLint sz );
int
-_mesa_alloc_opcode( GLcontext *ctx, GLuint sz,
+_mesa_alloc_opcode( GLcontext *ctx, GLuint sz,
void (*execute)( GLcontext *, void * ),
void (*destroy)( GLcontext *, void * ),
void (*print)( GLcontext *, void * ) );
-/* $Id: drawpix.c,v 1.45 2000/11/16 21:05:34 keithw Exp $ */
+/* $Id: drawpix.c,v 1.46 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "mem.h"
#include "mmath.h"
#include "state.h"
-#include "types.h"
+#include "mtypes.h"
#include "swrast/swrast.h"
#endif
-/* $Id: drawpix.h,v 1.4 2000/10/31 18:09:44 keithw Exp $ */
+/* $Id: drawpix.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define DRAWPIXELS_H
-#include "types.h"
+#include "mtypes.h"
extern void
_mesa_DrawPixels( GLsizei width, GLsizei height,
-/* $Id: enable.c,v 1.32 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: enable.c,v 1.33 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "macros.h"
#include "mmath.h"
#include "simple_list.h"
-#include "types.h"
+#include "mtypes.h"
#include "enums.h"
#include "math/m_matrix.h"
{
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, "gl_enable/disable" );
- if (MESA_VERBOSE & VERBOSE_API)
- fprintf(stderr, "%s %s (newstate is %x)\n",
+ if (MESA_VERBOSE & VERBOSE_API)
+ fprintf(stderr, "%s %s (newstate is %x)\n",
state ? "glEnable" : "glDisable",
gl_lookup_enum_by_nr(cap),
ctx->NewState);
case GL_CLIP_PLANE3:
case GL_CLIP_PLANE4:
case GL_CLIP_PLANE5:
- if (ctx->Transform.ClipEnabled[cap-GL_CLIP_PLANE0] != state)
+ if (ctx->Transform.ClipEnabled[cap-GL_CLIP_PLANE0] != state)
{
GLuint p = cap-GL_CLIP_PLANE0;
if (state) {
ctx->_Enabled |= ENABLE_USERCLIP;
ctx->Transform._AnyClip++;
-
+
if (ctx->ProjectionMatrix.flags & MAT_DIRTY) {
_math_matrix_analyze( &ctx->ProjectionMatrix );
}
-
+
/* This derived state also calculated in clip.c and
* from gl_update_state() on changes to EyeUserPlane
* and ctx->ProjectionMatrix respectively.
ctx->ProjectionMatrix.inv );
} else {
if (--ctx->Transform._AnyClip == 0)
- ctx->_Enabled &= ~ENABLE_USERCLIP;
- }
+ ctx->_Enabled &= ~ENABLE_USERCLIP;
+ }
}
break;
case GL_COLOR_MATERIAL:
ctx->Light.Light[cap-GL_LIGHT0].Enabled = state;
if (state) {
- insert_at_tail(&ctx->Light.EnabledList,
+ insert_at_tail(&ctx->Light.EnabledList,
&ctx->Light.Light[cap-GL_LIGHT0]);
if (ctx->Light.Enabled)
ctx->_Enabled |= ENABLE_LIGHT;
ctx->Eval.Map2Normal = state;
ctx->NewState |= _NEW_EVAL;
break;
- case GL_MAP2_TEXTURE_COORD_1:
+ case GL_MAP2_TEXTURE_COORD_1:
ctx->Eval.Map2TextureCoord1 = state;
ctx->NewState |= _NEW_EVAL;
break;
return ctx->Eval.Map2Index;
case GL_MAP2_NORMAL:
return ctx->Eval.Map2Normal;
- case GL_MAP2_TEXTURE_COORD_1:
+ case GL_MAP2_TEXTURE_COORD_1:
return ctx->Eval.Map2TextureCoord1;
case GL_MAP2_TEXTURE_COORD_2:
return ctx->Eval.Map2TextureCoord2;
static void
client_state( GLcontext *ctx, GLenum cap, GLboolean state )
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx,
- (state
- ? "glEnableClientState"
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx,
+ (state
+ ? "glEnableClientState"
: "glDisableClientState") );
switch (cap) {
-/* $Id: enable.h,v 1.2 1999/11/11 01:22:26 brianp Exp $ */
+/* $Id: enable.h,v 1.3 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define ENABLE_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: eval.c,v 1.15 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: eval.c,v 1.16 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "macros.h"
#include "mem.h"
#include "mmath.h"
-#include "types.h"
+#include "mtypes.h"
#endif
/*
- * Copy 1-parametric evaluator control points from user-specified
+ * Copy 1-parametric evaluator control points from user-specified
* memory space to a buffer of contiguous control points.
* Input: see glMap1f for details
* Return: pointer to buffer of contiguous control points or NULL if out
buffer = (GLfloat *) MALLOC(uorder * size * sizeof(GLfloat));
- if(buffer)
+ if(buffer)
for(i=0, p=buffer; i<uorder; i++, points+=ustride)
for(k=0; k<size; k++)
*p++ = points[k];
/*
- * Copy 2-parametric evaluator control points from user-specified
+ * Copy 2-parametric evaluator control points from user-specified
* memory space to a buffer of contiguous control points.
* Additional memory is allocated to be used by the horner and
* de Casteljau evaluation schemes.
/* compute the increment value for the u-loop */
uinc = ustride - vorder*vstride;
- if (buffer)
+ if (buffer)
for (i=0, p=buffer; i<uorder; i++, points += uinc)
for (j=0; j<vorder; j++, points += vstride)
for (k=0; k<size; k++)
/* compute the increment value for the u-loop */
uinc = ustride - vorder*vstride;
- if (buffer)
+ if (buffer)
for (i=0, p=buffer; i<uorder; i++, points += uinc)
for (j=0; j<vorder; j++, points += vstride)
for (k=0; k<size; k++)
}
-
+
void
_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v )
{
-/* $Id: eval.h,v 1.3 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: eval.h,v 1.4 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define EVAL_H
-#include "types.h"
+#include "mtypes.h"
extern void gl_init_eval( void );
-/* $Id: extensions.c,v 1.41 2000/11/17 21:01:25 brianp Exp $ */
+/* $Id: extensions.c,v 1.42 2000/11/22 07:32:16 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "extensions.h"
#include "mem.h"
#include "simple_list.h"
-#include "types.h"
+#include "mtypes.h"
#endif
GLint enabled;
GLboolean *flag; /* optional flag stored elsewhere */
char name[MAX_EXT_NAMELEN+1];
- void (*notify)( GLcontext *, GLboolean );
+ void (*notify)( GLcontext *, GLboolean );
};
#define F(x) (int)&(((struct gl_extensions *)0)->x)
#define ON GL_TRUE
#define OFF GL_FALSE
-static struct {
- GLboolean enabled;
- const char *name;
- int flag_offset;
+static struct {
+ GLboolean enabled;
+ const char *name;
+ int flag_offset;
} default_extensions[] = {
{ ON, "GL_ARB_imaging", F(ARB_imaging) },
{ ON, "GL_ARB_multitexture", F(ARB_multitexture) },
{ ON, "GL_EXT_point_parameters", F(EXT_point_parameters) },
{ ON, "GL_EXT_polygon_offset", F(EXT_polygon_offset) },
{ ON, "GL_EXT_rescale_normal", F(EXT_rescale_normal) },
- { ON, "GL_EXT_secondary_color", F(EXT_secondary_color) },
+ { ON, "GL_EXT_secondary_color", F(EXT_secondary_color) },
{ ON, "GL_EXT_shared_texture_palette", F(EXT_shared_texture_palette) },
{ ON, "GL_EXT_stencil_wrap", F(EXT_stencil_wrap) },
{ ON, "GL_EXT_texture3D", F(EXT_texture3D) },
-int gl_extensions_add( GLcontext *ctx,
- GLboolean enabled,
- const char *name,
+int gl_extensions_add( GLcontext *ctx,
+ GLboolean enabled,
+ const char *name,
GLboolean *flag_ptr )
{
if (ctx->Extensions.ext_string == 0) {
static int set_extension( GLcontext *ctx, const char *name, GLint state )
{
struct extension *i;
- foreach( i, ctx->Extensions.ext_list )
- if (strncmp(i->name, name, MAX_EXT_NAMELEN) == 0)
+ foreach( i, ctx->Extensions.ext_list )
+ if (strncmp(i->name, name, MAX_EXT_NAMELEN) == 0)
break;
if (i == ctx->Extensions.ext_list)
return 1;
if (i->flag)
- *(i->flag) = state;
+ *(i->flag) = state;
i->enabled = state;
return 0;
-}
+}
int gl_extensions_enable( GLcontext *ctx, const char *name )
{
- if (ctx->Extensions.ext_string == 0)
+ if (ctx->Extensions.ext_string == 0)
return set_extension( ctx, name, 1 );
return 1;
}
int gl_extensions_disable( GLcontext *ctx, const char *name )
{
- if (ctx->Extensions.ext_string == 0)
+ if (ctx->Extensions.ext_string == 0)
return set_extension( ctx, name, 0 );
return 1;
}
-
+
/*
* Test if the named extension is enabled in this context.
remove_from_list( i );
FREE( i );
}
-
+
FREE(ctx->Extensions.ext_list);
ctx->Extensions.ext_list = 0;
- }
+ }
}
if (default_extensions[i].flag_offset)
ptr = base + default_extensions[i].flag_offset;
- gl_extensions_add( ctx,
+ gl_extensions_add( ctx,
default_extensions[i].enabled,
default_extensions[i].name,
ptr);
const char *gl_extensions_get_string( GLcontext *ctx )
{
- if (ctx->Extensions.ext_string == 0)
+ if (ctx->Extensions.ext_string == 0)
{
struct extension *i;
char *str;
GLuint len = 0;
- foreach (i, ctx->Extensions.ext_list)
+ foreach (i, ctx->Extensions.ext_list)
if (i->enabled)
len += strlen(i->name) + 1;
-
- if (len == 0)
+
+ if (len == 0)
return "";
str = (char *)MALLOC(len * sizeof(char));
ctx->Extensions.ext_string = str;
- foreach (i, ctx->Extensions.ext_list)
+ foreach (i, ctx->Extensions.ext_list)
if (i->enabled) {
strcpy(str, i->name);
str += strlen(str);
*(str-1) = 0;
}
-
+
return ctx->Extensions.ext_string;
}
-/* $Id: extensions.h,v 1.10 2000/11/17 21:01:25 brianp Exp $ */
+/* $Id: extensions.h,v 1.11 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#ifndef _EXTENSIONS_H_
#define _EXTENSIONS_H_
-#include "types.h"
+#include "mtypes.h"
extern void
/* Return 0 on success.
*/
-extern int gl_extensions_add( GLcontext *ctx, GLboolean enabled,
+extern int gl_extensions_add( GLcontext *ctx, GLboolean enabled,
const char *name, GLboolean *flag_ptr );
extern int gl_extensions_enable( GLcontext *ctx, const char *name );
-/* $Id: feedback.c,v 1.16 2000/11/05 18:40:57 keithw Exp $ */
+/* $Id: feedback.c,v 1.17 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#include "feedback.h"
#include "macros.h"
#include "mmath.h"
-#include "types.h"
+#include "mtypes.h"
#endif
*/
void gl_feedback_vertex( GLcontext *ctx,
const GLfloat win[4],
- const GLfloat color[4],
+ const GLfloat color[4],
GLuint index,
const GLfloat texcoord[4] )
{
-/* $Id: feedback.h,v 1.4 2000/11/05 18:40:58 keithw Exp $ */
+/* $Id: feedback.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define FEEDBACK_H
-#include "types.h"
+#include "mtypes.h"
#define FEEDBACK_TOKEN( CTX, T ) \
extern void gl_feedback_vertex( GLcontext *ctx,
const GLfloat win[4],
- const GLfloat color[4],
+ const GLfloat color[4],
GLuint index,
const GLfloat texcoord[4] );
-/* $Id: fog.c,v 1.29 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: fog.c,v 1.30 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "colormac.h"
#include "context.h"
#include "fog.h"
-#include "types.h"
+#include "mtypes.h"
#endif
}
-void
+void
_mesa_Fogfv( GLenum pname, const GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
-/* $Id: fog.h,v 1.10 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: fog.h,v 1.11 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define FOG_H
-#include "types.h"
+#include "mtypes.h"
-/* $Id: get.c,v 1.42 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: get.c,v 1.43 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "get.h"
#include "macros.h"
#include "mmath.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_matrix.h"
#endif
if (!params)
return;
- if (MESA_VERBOSE & VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetBooleanv %s\n", gl_lookup_enum_by_nr(pname));
if (ctx->Driver.GetBooleanv
break;
case GL_TEXTURE_MATRIX:
for (i=0;i<16;i++) {
- params[i] =
+ params[i] =
FLOAT_TO_BOOL(ctx->TextureMatrix[texTransformUnit].m[i]);
}
break;
break;
case GL_ALWAYS_FAST_HINT_PGI:
*params = (GLboolean) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
+ ctx->Hint.AllowDrawFrg == GL_FALSE &&
ctx->Hint.AllowDrawMem == GL_FALSE);
break;
case GL_ALWAYS_SOFT_HINT_PGI:
*params = (GLboolean) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
+ ctx->Hint.AllowDrawFrg == GL_TRUE &&
ctx->Hint.AllowDrawMem == GL_TRUE);
break;
case GL_ALLOW_DRAW_OBJ_HINT_PGI:
case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
*params = ctx->Pixel.PostColorMatrixColorTableEnabled;
break;
-
+
/* GL_EXT_secondary_color */
- case GL_COLOR_SUM_EXT:
+ case GL_COLOR_SUM_EXT:
*params = ctx->Fog.ColorSumEnabled;
break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
+ case GL_CURRENT_SECONDARY_COLOR_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
params[0] = INT_TO_BOOL(ctx->Current.SecondaryColor[0]);
params[1] = INT_TO_BOOL(ctx->Current.SecondaryColor[1]);
case GL_SECONDARY_COLOR_ARRAY_EXT:
*params = ctx->Array.SecondaryColor.Enabled;
break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
*params = ENUM_TO_BOOL(ctx->Array.SecondaryColor.Type);
break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
*params = INT_TO_BOOL(ctx->Array.SecondaryColor.Stride);
break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
*params = INT_TO_BOOL(ctx->Array.SecondaryColor.Stride);
break;
/* GL_EXT_fog_coord */
- case GL_CURRENT_FOG_COORDINATE_EXT:
+ case GL_CURRENT_FOG_COORDINATE_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
*params = FLOAT_TO_BOOL(ctx->Current.FogCoord);
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
*params = ctx->Array.FogCoord.Enabled;
break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
*params = ENUM_TO_BOOL(ctx->Array.FogCoord.Type);
break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
*params = INT_TO_BOOL(ctx->Array.FogCoord.Stride);
break;
if (!params)
return;
- if (MESA_VERBOSE & VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetDoublev %s\n", gl_lookup_enum_by_nr(pname));
if (ctx->Driver.GetDoublev && (*ctx->Driver.GetDoublev)(ctx, pname, params))
break;
case GL_ALWAYS_FAST_HINT_PGI:
*params = (GLdouble) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
+ ctx->Hint.AllowDrawFrg == GL_FALSE &&
ctx->Hint.AllowDrawMem == GL_FALSE);
break;
case GL_ALWAYS_SOFT_HINT_PGI:
*params = (GLdouble) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
+ ctx->Hint.AllowDrawFrg == GL_TRUE &&
ctx->Hint.AllowDrawMem == GL_TRUE);
break;
case GL_ALLOW_DRAW_OBJ_HINT_PGI:
break;
/* GL_EXT_secondary_color */
- case GL_COLOR_SUM_EXT:
+ case GL_COLOR_SUM_EXT:
*params = (GLdouble) ctx->Fog.ColorSumEnabled;
break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
+ case GL_CURRENT_SECONDARY_COLOR_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
params[0] = UBYTE_COLOR_TO_FLOAT_COLOR(ctx->Current.SecondaryColor[0]);
params[1] = UBYTE_COLOR_TO_FLOAT_COLOR(ctx->Current.SecondaryColor[1]);
case GL_SECONDARY_COLOR_ARRAY_EXT:
*params = (GLdouble) ctx->Array.SecondaryColor.Enabled;
break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
*params = (GLdouble) ctx->Array.SecondaryColor.Type;
break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
*params = (GLdouble) ctx->Array.SecondaryColor.Stride;
break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
*params = (GLdouble) ctx->Array.SecondaryColor.Stride;
break;
/* GL_EXT_fog_coord */
- case GL_CURRENT_FOG_COORDINATE_EXT:
+ case GL_CURRENT_FOG_COORDINATE_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
*params = (GLdouble) ctx->Current.FogCoord;
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
*params = (GLdouble) ctx->Array.FogCoord.Enabled;
break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
*params = (GLdouble) ctx->Array.FogCoord.Type;
break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
*params = (GLdouble) ctx->Array.FogCoord.Stride;
break;
if (!params)
return;
- if (MESA_VERBOSE & VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetFloatv %s\n", gl_lookup_enum_by_nr(pname));
if (ctx->Driver.GetFloatv && (*ctx->Driver.GetFloatv)(ctx, pname, params))
break;
case GL_ALWAYS_FAST_HINT_PGI:
*params = (GLfloat) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
+ ctx->Hint.AllowDrawFrg == GL_FALSE &&
ctx->Hint.AllowDrawMem == GL_FALSE);
break;
case GL_ALWAYS_SOFT_HINT_PGI:
*params = (GLfloat) (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
+ ctx->Hint.AllowDrawFrg == GL_TRUE &&
ctx->Hint.AllowDrawMem == GL_TRUE);
break;
case GL_ALLOW_DRAW_OBJ_HINT_PGI:
break;
/* GL_EXT_secondary_color */
- case GL_COLOR_SUM_EXT:
+ case GL_COLOR_SUM_EXT:
*params = (GLfloat) ctx->Fog.ColorSumEnabled;
break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
+ case GL_CURRENT_SECONDARY_COLOR_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
params[0] = UBYTE_COLOR_TO_FLOAT_COLOR(ctx->Current.SecondaryColor[0]);
params[1] = UBYTE_COLOR_TO_FLOAT_COLOR(ctx->Current.SecondaryColor[1]);
case GL_SECONDARY_COLOR_ARRAY_EXT:
*params = (GLfloat) ctx->Array.SecondaryColor.Enabled;
break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
*params = (GLfloat) ctx->Array.SecondaryColor.Type;
break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
*params = (GLfloat) ctx->Array.SecondaryColor.Stride;
break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
*params = (GLfloat) ctx->Array.SecondaryColor.Stride;
break;
/* GL_EXT_fog_coord */
- case GL_CURRENT_FOG_COORDINATE_EXT:
+ case GL_CURRENT_FOG_COORDINATE_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
*params = (GLfloat) ctx->Current.FogCoord;
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
*params = (GLfloat) ctx->Array.FogCoord.Enabled;
break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
*params = (GLfloat) ctx->Array.FogCoord.Type;
break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
*params = (GLfloat) ctx->Array.FogCoord.Stride;
break;
if (!params)
return;
- if (MESA_VERBOSE & VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetIntegerv %s\n", gl_lookup_enum_by_nr(pname));
if (ctx->Driver.GetIntegerv
break;
case GL_ALWAYS_FAST_HINT_PGI:
*params = (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_FALSE &&
+ ctx->Hint.AllowDrawFrg == GL_FALSE &&
ctx->Hint.AllowDrawMem == GL_FALSE);
break;
case GL_ALWAYS_SOFT_HINT_PGI:
*params = (ctx->Hint.AllowDrawWin == GL_TRUE &&
- ctx->Hint.AllowDrawFrg == GL_TRUE &&
+ ctx->Hint.AllowDrawFrg == GL_TRUE &&
ctx->Hint.AllowDrawMem == GL_TRUE);
break;
case GL_ALLOW_DRAW_OBJ_HINT_PGI:
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
*params = ctx->Array.LockCount;
break;
-
+
/* GL_ARB_transpose_matrix */
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
{
/* GL_EXT_secondary_color */
- case GL_COLOR_SUM_EXT:
+ case GL_COLOR_SUM_EXT:
*params = (GLint) ctx->Fog.ColorSumEnabled;
break;
- case GL_CURRENT_SECONDARY_COLOR_EXT:
+ case GL_CURRENT_SECONDARY_COLOR_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
params[0] = FLOAT_TO_INT( UBYTE_COLOR_TO_FLOAT_COLOR( ctx->Current.SecondaryColor[0] ) );
params[1] = FLOAT_TO_INT( UBYTE_COLOR_TO_FLOAT_COLOR( ctx->Current.SecondaryColor[1] ) );
case GL_SECONDARY_COLOR_ARRAY_EXT:
*params = (GLint) ctx->Array.SecondaryColor.Enabled;
break;
- case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_TYPE_EXT:
*params = (GLint) ctx->Array.SecondaryColor.Type;
break;
- case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
*params = (GLint) ctx->Array.SecondaryColor.Stride;
break;
- case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
+ case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
*params = (GLint) ctx->Array.SecondaryColor.Stride;
break;
/* GL_EXT_fog_coord */
- case GL_CURRENT_FOG_COORDINATE_EXT:
+ case GL_CURRENT_FOG_COORDINATE_EXT:
FLUSH_TNL( ctx, FLUSH_UPDATE_CURRENT );
*params = (GLint) ctx->Current.FogCoord;
break;
case GL_FOG_COORDINATE_ARRAY_EXT:
*params = (GLint) ctx->Array.FogCoord.Enabled;
break;
- case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_TYPE_EXT:
*params = (GLint) ctx->Array.FogCoord.Type;
break;
- case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
+ case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
*params = (GLint) ctx->Array.FogCoord.Stride;
break;
if (!params)
return;
- if (MESA_VERBOSE & VERBOSE_API)
+ if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetPointerv %s\n", gl_lookup_enum_by_nr(pname));
if (ctx->Driver.GetPointerv
-/* $Id: get.h,v 1.3 1999/11/11 01:22:26 brianp Exp $ */
+/* $Id: get.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define GET_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: hint.h,v 1.1 2000/02/02 19:14:56 brianp Exp $ */
+/* $Id: hint.h,v 1.2 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define HINT_H
-#include "types.h"
+#include "mtypes.h"
extern GLboolean
-/* $Id: histogram.h,v 1.1 2000/11/10 18:06:14 brianp Exp $ */
+/* $Id: histogram.h,v 1.2 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
#include "all.h"
#else
#include "glheader.h"
-#include "types.h"
+#include "mtypes.h"
#endif
-/* $Id: image.c,v 1.48 2000/11/10 18:06:14 brianp Exp $ */
+/* $Id: image.c,v 1.49 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "mem.h"
#include "mmath.h"
#include "pixel.h"
-#include "types.h"
+#include "mtypes.h"
#endif
alphaIndex = 0;
stride = 1;
break;
- case GL_LUMINANCE:
+ case GL_LUMINANCE:
redIndex = greenIndex = blueIndex = 0;
alphaIndex = -1;
stride = 1;
GLuint i;
for (i = 0; i < n; i ++) {
GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
+ rgba[i][rComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
rgba[i][gComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 16) & 0xff);
rgba[i][bComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 8) & 0xff);
rgba[i][aComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p ) & 0xff);
rgba[i][rComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p ) & 0xff);
rgba[i][gComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 8) & 0xff);
rgba[i][bComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
+ rgba[i][aComp] = UBYTE_COLOR_TO_FLOAT_COLOR((p >> 24) );
}
}
break;
GLuint transferOps )
{
ASSERT(dstFormat == GL_ALPHA ||
- dstFormat == GL_LUMINANCE ||
+ dstFormat == GL_LUMINANCE ||
dstFormat == GL_LUMINANCE_ALPHA ||
dstFormat == GL_INTENSITY ||
dstFormat == GL_RGB ||
dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
dstLuminanceIndex = dstIntensityIndex = -1;
break;
- case GL_LUMINANCE:
+ case GL_LUMINANCE:
dstLuminanceIndex = 0;
dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
dstIntensityIndex = -1;
GLuint transferOps, GLboolean clamp )
{
ASSERT(dstFormat == GL_ALPHA ||
- dstFormat == GL_LUMINANCE ||
+ dstFormat == GL_LUMINANCE ||
dstFormat == GL_LUMINANCE_ALPHA ||
dstFormat == GL_INTENSITY ||
dstFormat == GL_RGB ||
dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
dstLuminanceIndex = dstIntensityIndex = -1;
break;
- case GL_LUMINANCE:
+ case GL_LUMINANCE:
dstLuminanceIndex = 0;
dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
dstIntensityIndex = -1;
-/* $Id: image.h,v 1.13 2000/10/29 18:12:15 brianp Exp $ */
+/* $Id: image.h,v 1.14 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define IMAGE_H
-#include "types.h"
+#include "mtypes.h"
extern const struct gl_pixelstore_attrib _mesa_native_packing;
-/* $Id: imports.c,v 1.2 2000/09/27 03:30:49 brianp Exp $ */
+/* $Id: imports.c,v 1.3 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
#include "glheader.h"
#include "imports.h"
#include "mem.h"
-#include "types.h"
+#include "mtypes.h"
static void *
-/* $Id: light.c,v 1.26 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: light.c,v 1.27 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "mem.h"
#include "mmath.h"
#include "simple_list.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_xform.h"
#include "math/m_matrix.h"
ctx->NewState |= _NEW_LIGHT;
- if (ctx->Driver.ShadeModel)
+ if (ctx->Driver.ShadeModel)
(*ctx->Driver.ShadeModel)( ctx, mode );
}
}
case GL_POSITION:
/* transform position by ModelView matrix */
TRANSFORM_POINT( l->EyePosition, ctx->ModelView.m, params );
- if (l->EyePosition[3] != 0.0F)
+ if (l->EyePosition[3] != 0.0F)
l->_Flags |= LIGHT_POSITIONAL;
else
l->_Flags &= ~LIGHT_POSITIONAL;
}
l->SpotCutoff = params[0];
l->_CosCutoff = cos(params[0]*DEG2RAD);
- if (l->_CosCutoff < 0)
+ if (l->_CosCutoff < 0)
l->_CosCutoff = 0;
if (l->SpotCutoff != 180.0F)
l->_Flags |= LIGHT_SPOT;
ctx->Light.Model.LocalViewer = GL_TRUE;
break;
case GL_LIGHT_MODEL_TWO_SIDE:
- if (params[0]==0.0)
+ if (params[0]==0.0)
ctx->Light.Model.TwoSide = GL_FALSE;
else
ctx->Light.Model.TwoSide = GL_TRUE;
break;
}
- if (ctx->Driver.LightModelfv)
+ if (ctx->Driver.LightModelfv)
ctx->Driver.LightModelfv( ctx, pname, params );
ctx->NewState |= _NEW_LIGHT;
* Given a face and pname value (ala glColorMaterial), compute a bitmask
* of the targeted material values.
*/
-GLuint gl_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname,
+GLuint gl_material_bitmask( GLcontext *ctx, GLenum face, GLenum pname,
GLuint legal,
const char *where )
{
gl_error( ctx, GL_INVALID_ENUM, where );
return 0;
}
-
+
if (bitmask & ~legal) {
gl_error( ctx, GL_INVALID_ENUM, where );
return 0;
*
* KW: Added code here to keep the precomputed variables uptodate.
* This means we can use the faster shade functions when using
- * GL_COLOR_MATERIAL, and we can also now use the precomputed
+ * GL_COLOR_MATERIAL, and we can also now use the precomputed
* values in the slower shading functions, which further offsets
* the cost of doing this here.
*/
-void gl_update_material( GLcontext *ctx,
- const struct gl_material src[2],
+void gl_update_material( GLcontext *ctx,
+ const struct gl_material src[2],
GLuint bitmask )
{
struct gl_light *light, *list = &ctx->Light.EnabledList;
if (ctx->Light.ColorMaterialEnabled)
bitmask &= ~ctx->Light.ColorMaterialBitmask;
- if (MESA_VERBOSE&VERBOSE_IMMEDIATE)
+ if (MESA_VERBOSE&VERBOSE_IMMEDIATE)
fprintf(stderr, "gl_update_material, mask 0x%x\n", bitmask);
- if (!bitmask)
+ if (!bitmask)
return;
/* update material emission */
SUB_3V( tmp, src[0].Specular, mat->Specular );
foreach (light, list) {
ACC_SCALE_3V( light->_MatSpecular[0], light->Specular, tmp );
- light->_IsMatSpecular[0] =
+ light->_IsMatSpecular[0] =
(LEN_SQUARED_3FV(light->_MatSpecular[0]) > 1e-16);
}
COPY_4FV( mat->Specular, src[0].Specular );
SUB_3V( tmp, src[1].Specular, mat->Specular );
foreach (light, list) {
ACC_SCALE_3V( light->_MatSpecular[1], light->Specular, tmp );
- light->_IsMatSpecular[1] =
+ light->_IsMatSpecular[1] =
(LEN_SQUARED_3FV(light->_MatSpecular[1]) > 1e-16);
}
COPY_4FV( mat->Specular, src[1].Specular );
* according to the bitmask in ColorMaterialBitmask, which is
* set by glColorMaterial().
*/
-void gl_update_color_material( GLcontext *ctx,
+void gl_update_color_material( GLcontext *ctx,
const GLchan rgba[4] )
{
struct gl_light *light, *list = &ctx->Light.EnabledList;
SUB_3V( tmp, color, mat->Specular );
foreach (light, list) {
ACC_SCALE_3V( light->_MatSpecular[0], light->Specular, tmp );
- light->_IsMatSpecular[0] =
+ light->_IsMatSpecular[0] =
(LEN_SQUARED_3FV(light->_MatSpecular[0]) > 1e-16);
}
COPY_4FV( mat->Specular, color );
SUB_3V( tmp, color, mat->Specular );
foreach (light, list) {
ACC_SCALE_3V( light->_MatSpecular[1], light->Specular, tmp );
- light->_IsMatSpecular[1] =
+ light->_IsMatSpecular[1] =
(LEN_SQUARED_3FV(light->_MatSpecular[1]) > 1e-16);
}
COPY_4FV( mat->Specular, color );
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glColorMaterial");
- if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glColorMaterial %s %s\n",
+ if (MESA_VERBOSE&VERBOSE_API)
+ fprintf(stderr, "glColorMaterial %s %s\n",
gl_lookup_enum_by_nr(face),
gl_lookup_enum_by_nr(mode));
* orientation of the facet is later learned, we can determine which
* color (or index) to use for rendering.
*
- * KW: We now know orientation in advance and only shade for
+ * KW: We now know orientation in advance and only shade for
* the side or sides which are actually required.
*
* Variables:
* // light at infinity
* IF local_viewer THEN
* _VP_inf_norm = unit vector from V to P // Precompute
- * ELSE
+ * ELSE
* // eye at infinity
* _h_inf_norm = Normalize( VP + <0,0,1> ) // Precompute
* ENDIF
m[i] = t;
else
m[i] = 0.0;
- }
+ }
m[SHINE_TABLE_SIZE] = 1.0;
}
struct gl_shine_tab *list = ctx->_ShineTabList;
struct gl_shine_tab *s;
- foreach(s, list)
- if ( DISTSQR(s->shininess, shininess) < 1e-4 )
+ foreach(s, list)
+ if ( DISTSQR(s->shininess, shininess) < 1e-4 )
break;
if (s == list) {
- foreach(s, list)
+ foreach(s, list)
if (s->refcount == 0)
break;
ctx->_NeedEyeCoords &= ~NEED_EYE_LIGHT;
ctx->_NeedNormals &= ~NEED_NORMALS_LIGHT;
ctx->Light._Flags = 0;
-
- if (!ctx->Light.Enabled)
+
+ if (!ctx->Light.Enabled)
return;
ctx->_NeedNormals |= NEED_NORMALS_LIGHT;
ctx->Light._Flags |= light->_Flags;
}
- ctx->Light._NeedVertices =
+ ctx->Light._NeedVertices =
((ctx->Light._Flags & (LIGHT_POSITIONAL|LIGHT_SPOT)) ||
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ||
ctx->Light.Model.LocalViewer);
-
- if ((ctx->Light._Flags & LIGHT_POSITIONAL) ||
- ctx->Light.Model.LocalViewer)
+
+ if ((ctx->Light._Flags & LIGHT_POSITIONAL) ||
+ ctx->Light.Model.LocalViewer)
ctx->_NeedEyeCoords |= NEED_EYE_LIGHT;
-
-
+
+
/* XXX: This test is overkill & needs to be fixed both for software and
* hardware t&l drivers. The above should be sufficient & should
- * be tested to verify this.
+ * be tested to verify this.
*/
if (ctx->Light._NeedVertices)
ctx->_NeedEyeCoords |= NEED_EYE_LIGHT;
-
+
/* Precompute some shading values.
*/
struct gl_material *mat = &ctx->Light.Material[side];
COPY_3V(ctx->Light._BaseColor[side], mat->Emission);
- ACC_SCALE_3V(ctx->Light._BaseColor[side],
+ ACC_SCALE_3V(ctx->Light._BaseColor[side],
ctx->Light.Model.Ambient,
mat->Ambient);
FLOAT_COLOR_TO_CHAN(ctx->Light._BaseAlpha[side],
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 );
SCALE_3V( light->_MatAmbient[side], light->Ambient, mat->Ambient );
SCALE_3V( light->_MatSpecular[side], light->Specular,
mat->Specular);
- light->_IsMatSpecular[side] =
+ light->_IsMatSpecular[side] =
(LEN_SQUARED_3FV(light->_MatSpecular[side]) > 1e-16);
}
}
- }
+ }
else {
static const GLfloat ci[3] = { .30, .59, .11 };
foreach(light, &ctx->Light.EnabledList) {
else {
TRANSFORM_NORMAL( ctx->_EyeZDir, eye_z, ctx->ModelView.m );
}
-
+
foreach (light, &ctx->Light.EnabledList) {
if (ctx->_NeedEyeCoords) {
COPY_4FV( light->_Position, light->EyePosition );
}
else {
- TRANSFORM_POINT( light->_Position, ctx->ModelView.inv,
+ TRANSFORM_POINT( light->_Position, ctx->ModelView.inv,
light->EyePosition );
}
}
light->_VP_inf_spot_attenuation = 1.0;
}
-
+
if (light->_Flags & LIGHT_SPOT) {
if (ctx->_NeedEyeCoords) {
COPY_3V( light->_NormDirection, light->EyeDirection );
}
else {
- TRANSFORM_NORMAL( light->_NormDirection,
+ TRANSFORM_NORMAL( light->_NormDirection,
light->EyeDirection,
ctx->ModelView.m);
}
NORMALIZE_3FV( light->_NormDirection );
if (!(light->_Flags & LIGHT_POSITIONAL)) {
- GLfloat PV_dot_dir = - DOT3(light->_VP_inf_norm,
+ GLfloat PV_dot_dir = - DOT3(light->_VP_inf_norm,
light->_NormDirection);
if (PV_dot_dir > light->_CosCutoff) {
double x = PV_dot_dir * (EXP_TABLE_SIZE-1);
int k = (int) x;
- light->_VP_inf_spot_attenuation =
- (light->_SpotExpTable[k][0] +
+ light->_VP_inf_spot_attenuation =
+ (light->_SpotExpTable[k][0] +
(x-k)*light->_SpotExpTable[k][1]);
}
else {
-/* $Id: light.h,v 1.5 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: light.h,v 1.6 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define LIGHT_H
-#include "types.h"
+#include "mtypes.h"
extern void
/* Lerp between adjacent values in the f(x) lookup table, giving a
* continuous function, with adequeate overall accuracy. (Though
- * still pretty good compared to a straight lookup).
+ * still pretty good compared to a straight lookup).
*/
#define GET_SHINE_TAB_ENTRY( table, dp, result ) \
do { \
-extern GLuint gl_material_bitmask( GLcontext *ctx,
- GLenum face, GLenum pname,
+extern GLuint gl_material_bitmask( GLcontext *ctx,
+ GLenum face, GLenum pname,
GLuint legal,
const char * );
extern void gl_compute_spot_exp_table( struct gl_light *l );
-extern void gl_compute_shine_table( GLcontext *ctx, GLuint i,
+extern void gl_compute_shine_table( GLcontext *ctx, GLuint i,
GLfloat shininess );
extern void gl_update_lighting( GLcontext *ctx );
extern void gl_compute_light_positions( GLcontext *ctx );
-extern void gl_update_material( GLcontext *ctx,
- const struct gl_material src[2],
+extern void gl_update_material( GLcontext *ctx,
+ const struct gl_material src[2],
GLuint bitmask );
extern void gl_update_color_material( GLcontext *ctx, const GLchan rgba[4] );
-/* $Id: lines.c,v 1.22 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: lines.c,v 1.23 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "macros.h"
#include "mmath.h"
#include "texstate.h"
-#include "types.h"
+#include "mtypes.h"
#endif
return;
}
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glLineWidth");
-
+
if (ctx->Line.Width != width) {
ctx->Line.Width = width;
ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
-/* $Id: lines.h,v 1.3 2000/10/31 18:09:44 keithw Exp $ */
+/* $Id: lines.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define LINES_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: matrix.c,v 1.26 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: matrix.c,v 1.27 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "matrix.h"
#include "mem.h"
#include "mmath.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_matrix.h"
#endif
GET_ACTIVE_MATRIX( ctx, mat, ctx->NewState, "glFrustrum" );
if (nearval <= 0.0 ||
- farval <= 0.0 ||
- nearval == farval ||
- left == right ||
- top == bottom)
+ farval <= 0.0 ||
+ nearval == farval ||
+ left == right ||
+ top == bottom)
{
gl_error( ctx, GL_INVALID_VALUE, "glFrustum" );
return;
}
-
+
_math_matrix_frustrum( mat, left, right, bottom, top, nearval, farval );
}
GLmatrix *mat = 0;
GET_ACTIVE_MATRIX( ctx, mat, ctx->NewState, "glOrtho" );
-
- if (left == right ||
- bottom == top ||
- nearval == farval)
+
+ if (left == right ||
+ bottom == top ||
+ nearval == farval)
{
gl_error( ctx, GL_INVALID_VALUE, "gl_Ortho" );
return;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPushMatrix");
if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glPushMatrix %s\n",
+ fprintf(stderr, "glPushMatrix %s\n",
gl_lookup_enum_by_nr(ctx->Transform.MatrixMode));
switch (ctx->Transform.MatrixMode) {
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPopMatrix");
if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glPopMatrix %s\n",
+ fprintf(stderr, "glPopMatrix %s\n",
gl_lookup_enum_by_nr(ctx->Transform.MatrixMode));
switch (ctx->Transform.MatrixMode) {
/*
- * Multiply the active matrix by an arbitary matrix.
+ * Multiply the active matrix by an arbitary matrix.
*/
void
_mesa_MultMatrixd( const GLdouble *m )
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glViewport %d %d %d %d\n", x, y, width, height);
-
+
/* clamp width, and height to implementation dependent range */
width = CLAMP( width, 1, MAX_WIDTH );
height = CLAMP( height, 1, MAX_HEIGHT );
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glDepthRange");
if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glDepthRange %f %f\n", nearval, farval);
+ fprintf(stderr, "glDepthRange %f %f\n", nearval, farval);
n = (GLfloat) CLAMP( nearval, 0.0, 1.0 );
f = (GLfloat) CLAMP( farval, 0.0, 1.0 );
-/* $Id: matrix.h,v 1.9 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: matrix.h,v 1.10 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define MATRIX_H
-#include "types.h"
+#include "mtypes.h"
#ifdef VMS
--- /dev/null
+/* $Id: mtypes.h,v 1.1 2000/11/22 07:32:17 joukj Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2000 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 TYPES_H
+#define TYPES_H
+
+
+#include "glheader.h"
+#include "config.h" /* Hardwired parameters */
+#include "fixed.h" /* GLfixed */
+#include "glapitable.h"
+#include "glthread.h"
+
+#include "math/m_matrix.h" /* GLmatrix */
+#include "math/m_translate.h" /* trans_XXX_func */
+
+#if defined(MESA_TRACE)
+#include "Trace/tr_context.h"
+#endif
+
+
+/* This is a macro on IRIX */
+#ifdef _P
+#undef _P
+#endif
+
+
+/* Please try to mark derived values with a leading underscore ('_').
+ */
+
+/*
+ * Color channel data type:
+ */
+#if CHAN_BITS == 8
+ typedef GLubyte GLchan;
+#define CHAN_MAX 255
+#define CHAN_MAXF 255.0F
+#define CHAN_TYPE GL_UNSIGNED_BYTE
+#elif CHAN_BITS == 16
+ typedef GLushort GLchan;
+#define CHAN_MAX 65535
+#define CHAN_MAXF 65535.0F
+#define CHAN_TYPE GL_UNSIGNED_SHORT
+#elif CHAN_BITS == 32
+ typedef GLfloat GLchan;
+#define CHAN_MAX 1.0
+#define CHAN_MAXF 1.0F
+#define CHAN_TYPE GL_FLOAT
+#else
+#error illegal number of color channel bits
+#endif
+
+
+/*
+ * Accumulation buffer data type:
+ */
+#if ACCUM_BITS==8
+ typedef GLbyte GLaccum;
+#elif ACCUM_BITS==16
+ typedef GLshort GLaccum;
+#else
+# error "illegal number of accumulation bits"
+#endif
+
+
+/*
+ * Stencil buffer data type:
+ */
+#if STENCIL_BITS==8
+ typedef GLubyte GLstencil;
+# define STENCIL_MAX 0xff
+#elif STENCIL_BITS==16
+ typedef GLushort GLstencil;
+# define STENCIL_MAX 0xffff
+#else
+# error "illegal number of stencil bits"
+#endif
+
+
+/*
+ * Depth buffer data type:
+ */
+typedef GLuint GLdepth; /* Must be 32-bits! */
+
+
+/*
+ * Some forward type declarations
+ */
+struct _mesa_HashTable;
+struct gl_texture_object;
+typedef struct gl_visual GLvisual;
+typedef struct gl_frame_buffer GLframebuffer;
+typedef struct __GLcontextRec GLcontext;
+
+
+
+/* Data structure for color tables */
+struct gl_color_table {
+ GLvoid *Table;
+ GLboolean FloatTable; /* entries stored as floats? (or GLchan type) */
+ GLuint Size; /* number of entries (rows) in table */
+ GLenum Format;
+ GLenum IntFormat;
+ GLint RedSize;
+ GLint GreenSize;
+ GLint BlueSize;
+ GLint AlphaSize;
+ GLint LuminanceSize;
+ GLint IntensitySize;
+};
+
+
+/*
+ * Bit flags used for updating material values.
+ */
+#define FRONT_AMBIENT_BIT 0x1
+#define BACK_AMBIENT_BIT 0x2
+#define FRONT_DIFFUSE_BIT 0x4
+#define BACK_DIFFUSE_BIT 0x8
+#define FRONT_SPECULAR_BIT 0x10
+#define BACK_SPECULAR_BIT 0x20
+#define FRONT_EMISSION_BIT 0x40
+#define BACK_EMISSION_BIT 0x80
+#define FRONT_SHININESS_BIT 0x100
+#define BACK_SHININESS_BIT 0x200
+#define FRONT_INDEXES_BIT 0x400
+#define BACK_INDEXES_BIT 0x800
+
+#define FRONT_MATERIAL_BITS (FRONT_EMISSION_BIT | FRONT_AMBIENT_BIT | \
+ FRONT_DIFFUSE_BIT | FRONT_SPECULAR_BIT | \
+ FRONT_SHININESS_BIT | FRONT_INDEXES_BIT)
+
+#define BACK_MATERIAL_BITS (BACK_EMISSION_BIT | BACK_AMBIENT_BIT | \
+ BACK_DIFFUSE_BIT | BACK_SPECULAR_BIT | \
+ BACK_SHININESS_BIT | BACK_INDEXES_BIT)
+
+#define ALL_MATERIAL_BITS (FRONT_MATERIAL_BITS | BACK_MATERIAL_BITS)
+
+
+
+/*
+ * Specular exponent and material shininess lookup table sizes:
+ */
+#define EXP_TABLE_SIZE 512
+#define SHINE_TABLE_SIZE 256
+
+struct gl_shine_tab {
+ struct gl_shine_tab *next, *prev;
+ GLfloat tab[SHINE_TABLE_SIZE+1];
+ GLfloat shininess;
+ GLuint refcount;
+};
+
+
+struct gl_light {
+ struct gl_light *next; /* double linked list with sentinel */
+ struct gl_light *prev;
+
+ GLfloat Ambient[4]; /* ambient color */
+ GLfloat Diffuse[4]; /* diffuse color */
+ GLfloat Specular[4]; /* specular color */
+ GLfloat EyePosition[4]; /* position in eye coordinates */
+ GLfloat EyeDirection[4]; /* spotlight dir in eye coordinates */
+ GLfloat SpotExponent;
+ GLfloat SpotCutoff; /* in degress */
+ GLfloat _CosCutoff; /* = MAX(0, cos(SpotCutoff)) */
+ GLfloat ConstantAttenuation;
+ GLfloat LinearAttenuation;
+ GLfloat QuadraticAttenuation;
+ GLboolean Enabled; /* On/off flag */
+
+ /* Derived fields */
+ GLuint _Flags; /* State */
+
+ GLfloat _Position[4]; /* position in eye/obj coordinates */
+ GLfloat _VP_inf_norm[3]; /* Norm direction to infinite light */
+ GLfloat _h_inf_norm[3]; /* Norm( _VP_inf_norm + <0,0,1> ) */
+ GLfloat _NormDirection[4]; /* normalized spotlight direction */
+ GLfloat _VP_inf_spot_attenuation;
+
+ GLfloat _SpotExpTable[EXP_TABLE_SIZE][2]; /* to replace a pow() call */
+ GLfloat _MatAmbient[2][3]; /* material ambient * light ambient */
+ GLfloat _MatDiffuse[2][3]; /* material diffuse * light diffuse */
+ GLfloat _MatSpecular[2][3]; /* material spec * light specular */
+ GLfloat _dli; /* CI diffuse light intensity */
+ GLfloat _sli; /* CI specular light intensity */
+ GLboolean _IsMatSpecular[2];
+};
+
+
+struct gl_lightmodel {
+ GLfloat Ambient[4]; /* ambient color */
+ GLboolean LocalViewer; /* Local (or infinite) view point? */
+ GLboolean TwoSide; /* Two (or one) sided lighting? */
+ GLenum ColorControl; /* either GL_SINGLE_COLOR */
+ /* or GL_SEPARATE_SPECULAR_COLOR */
+};
+
+
+/* Move to using pointers to this struct in the immediate structs -
+ * this is too big to keep 94 unused copies (7K) lying around in
+ * display lists.
+ */
+struct gl_material
+{
+ GLfloat Ambient[4];
+ GLfloat Diffuse[4];
+ GLfloat Specular[4];
+ GLfloat Emission[4];
+ GLfloat Shininess;
+ GLfloat AmbientIndex; /* for color index lighting */
+ GLfloat DiffuseIndex; /* for color index lighting */
+ GLfloat SpecularIndex; /* for color index lighting */
+};
+
+
+
+
+
+/*
+ * Attribute structures:
+ * We define a struct for each attribute group to make pushing and
+ * popping attributes easy. Also it's a good organization.
+ */
+
+struct gl_accum_attrib {
+ GLfloat ClearColor[4]; /* Accumulation buffer clear color */
+};
+
+
+/*
+ * Used in DrawDestMask below
+ */
+#define FRONT_LEFT_BIT 1
+#define FRONT_RIGHT_BIT 2
+#define BACK_LEFT_BIT 4
+#define BACK_RIGHT_BIT 8
+
+
+struct gl_colorbuffer_attrib {
+ GLuint ClearIndex; /* Index to use for glClear */
+ GLfloat ClearColor[4]; /* Color to use for glClear */
+
+ GLuint IndexMask; /* Color index write mask */
+ GLubyte ColorMask[4]; /* Each flag is 0xff or 0x0 */
+
+ GLenum DrawBuffer; /* Which buffer to draw into */
+ GLenum DriverDrawBuffer; /* Current device driver dest buffer */
+ GLboolean MultiDrawBuffer; /* Drawing to mutliple buffers? */
+ GLubyte DrawDestMask; /* bitwise-OR of bitflags above */
+
+ /* alpha testing */
+ GLboolean AlphaEnabled; /* Alpha test enabled flag */
+ GLenum AlphaFunc; /* Alpha test function */
+ GLchan AlphaRef; /* Alpha ref value as GLchan */
+
+ /* blending */
+ GLboolean BlendEnabled; /* Blending enabled flag */
+ GLenum BlendSrcRGB; /* Blending source operator */
+ GLenum BlendDstRGB; /* Blending destination operator */
+ GLenum BlendSrcA; /* GL_INGR_blend_func_separate */
+ GLenum BlendDstA; /* GL_INGR_blend_func_separate */
+ GLenum BlendEquation;
+ GLfloat BlendColor[4];
+
+ /* logic op */
+ GLenum LogicOp; /* Logic operator */
+ GLboolean IndexLogicOpEnabled; /* Color index logic op enabled flag */
+ GLboolean ColorLogicOpEnabled; /* RGBA logic op enabled flag */
+
+ GLboolean DitherFlag; /* Dither enable flag */
+};
+
+
+struct gl_current_attrib {
+ /* These values valid only when FLUSH_TNL( FLUSH_UPDATE_CURRENT )
+ * has been called.
+ */
+ GLfloat Normal[3]; /* Current vertex normal */
+ GLchan Color[4]; /* Current RGBA color */
+ GLchan SecondaryColor[4]; /* Current secondary color */
+ GLfloat FogCoord; /* Current Fog coord */
+ GLuint Index; /* Current color index */
+ GLboolean EdgeFlag; /* Current edge flag */
+ GLfloat Texcoord[MAX_TEXTURE_UNITS][4]; /* Current texture coords */
+
+ /* These values are always valid.
+ */
+ GLfloat RasterPos[4]; /* Current raster position */
+ GLfloat RasterDistance; /* Current raster distance */
+ GLfloat RasterColor[4]; /* Current raster color */
+ GLuint RasterIndex; /* Current raster index */
+ GLfloat *RasterTexCoord; /* Current raster texcoord*/
+ GLfloat RasterMultiTexCoord[MAX_TEXTURE_UNITS][4];
+ GLboolean RasterPosValid; /* Raster po valid flag */
+};
+
+
+struct gl_depthbuffer_attrib {
+ GLenum Func; /* Function for depth buffer compare */
+ GLfloat Clear; /* Value to clear depth buffer to */
+ GLboolean Test; /* Depth buffering enabled flag */
+ GLboolean Mask; /* Depth buffer writable? */
+ GLboolean OcclusionTest; /* GL_HP_occlusion_test */
+};
+
+
+struct gl_enable_attrib {
+ GLboolean AlphaTest;
+ GLboolean AutoNormal;
+ GLboolean Blend;
+ GLboolean ClipPlane[MAX_CLIP_PLANES];
+ GLboolean ColorMaterial;
+ GLboolean Convolution1D;
+ GLboolean Convolution2D;
+ GLboolean Separable2D;
+ GLboolean CullFace;
+ GLboolean DepthTest;
+ GLboolean Dither;
+ GLboolean Fog;
+ GLboolean Histogram;
+ GLboolean Light[MAX_LIGHTS];
+ GLboolean Lighting;
+ GLboolean LineSmooth;
+ GLboolean LineStipple;
+ GLboolean IndexLogicOp;
+ GLboolean ColorLogicOp;
+ GLboolean Map1Color4;
+ GLboolean Map1Index;
+ GLboolean Map1Normal;
+ GLboolean Map1TextureCoord1;
+ GLboolean Map1TextureCoord2;
+ GLboolean Map1TextureCoord3;
+ GLboolean Map1TextureCoord4;
+ GLboolean Map1Vertex3;
+ GLboolean Map1Vertex4;
+ GLboolean Map2Color4;
+ GLboolean Map2Index;
+ GLboolean Map2Normal;
+ GLboolean Map2TextureCoord1;
+ GLboolean Map2TextureCoord2;
+ GLboolean Map2TextureCoord3;
+ GLboolean Map2TextureCoord4;
+ GLboolean Map2Vertex3;
+ GLboolean Map2Vertex4;
+ GLboolean MinMax;
+ GLboolean Normalize;
+ GLboolean PixelTexture;
+ GLboolean PointSmooth;
+ GLboolean PolygonOffsetPoint;
+ GLboolean PolygonOffsetLine;
+ GLboolean PolygonOffsetFill;
+ GLboolean PolygonSmooth;
+ GLboolean PolygonStipple;
+ GLboolean RescaleNormals;
+ GLboolean Scissor;
+ GLboolean Stencil;
+ GLuint Texture[MAX_TEXTURE_UNITS];
+ GLuint TexGen[MAX_TEXTURE_UNITS];
+};
+
+
+struct gl_eval_attrib {
+ /* Enable bits */
+ GLboolean Map1Color4;
+ GLboolean Map1Index;
+ GLboolean Map1Normal;
+ GLboolean Map1TextureCoord1;
+ GLboolean Map1TextureCoord2;
+ GLboolean Map1TextureCoord3;
+ GLboolean Map1TextureCoord4;
+ GLboolean Map1Vertex3;
+ GLboolean Map1Vertex4;
+ GLboolean Map2Color4;
+ GLboolean Map2Index;
+ GLboolean Map2Normal;
+ GLboolean Map2TextureCoord1;
+ GLboolean Map2TextureCoord2;
+ GLboolean Map2TextureCoord3;
+ GLboolean Map2TextureCoord4;
+ GLboolean Map2Vertex3;
+ GLboolean Map2Vertex4;
+ GLboolean AutoNormal;
+ /* Map Grid endpoints and divisions and calculated du values */
+ GLint MapGrid1un;
+ GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du;
+ GLint MapGrid2un, MapGrid2vn;
+ GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du;
+ GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv;
+};
+
+
+struct gl_fog_attrib {
+ GLboolean Enabled; /* Fog enabled flag */
+ GLfloat Color[4]; /* Fog color */
+ GLfloat Density; /* Density >= 0.0 */
+ GLfloat Start; /* Start distance in eye coords */
+ GLfloat End; /* End distance in eye coords */
+ GLfloat Index; /* Fog index */
+ GLenum Mode; /* Fog mode */
+ GLboolean ColorSumEnabled;
+ GLenum FogCoordinateSource;
+};
+
+
+struct gl_hint_attrib {
+ /* always one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE */
+ GLenum PerspectiveCorrection;
+ GLenum PointSmooth;
+ GLenum LineSmooth;
+ GLenum PolygonSmooth;
+ GLenum Fog;
+
+ /* GL_PGI_misc_hints */
+ GLenum AllowDrawWin;
+ GLenum AllowDrawFrg;
+ GLenum AllowDrawMem;
+ GLenum StrictLighting;
+
+ /* GL_EXT_clip_volume_hint */
+ GLenum ClipVolumeClipping;
+
+ /* GL_ARB_texture_compression */
+ GLenum TextureCompression;
+};
+
+
+struct gl_histogram_attrib {
+ GLuint Width;
+ GLint Format;
+ GLboolean Sink;
+ GLuint RedSize;
+ GLuint GreenSize;
+ GLuint BlueSize;
+ GLuint AlphaSize;
+ GLuint LuminanceSize;
+ GLuint Count[HISTOGRAM_TABLE_SIZE][4];
+};
+
+
+struct gl_minmax_attrib {
+ GLenum Format;
+ GLboolean Sink;
+ GLfloat Min[4], Max[4]; /* RGBA */
+};
+
+
+struct gl_convolution_attrib {
+ GLenum Format;
+ GLenum InternalFormat;
+ GLuint Width;
+ GLuint Height;
+ GLfloat Filter[MAX_CONVOLUTION_WIDTH * MAX_CONVOLUTION_HEIGHT * 4];
+};
+
+
+struct gl_light_attrib {
+ struct gl_light Light[MAX_LIGHTS]; /* Array of lights */
+ struct gl_lightmodel Model; /* Lighting model */
+ struct gl_material Material[2]; /* Material 0=front, 1=back */
+ GLboolean Enabled; /* Lighting enabled flag */
+ GLenum ShadeModel; /* GL_FLAT or GL_SMOOTH */
+ GLenum ColorMaterialFace; /* GL_FRONT, BACK or FRONT_AND_BACK */
+ GLenum ColorMaterialMode; /* GL_AMBIENT, GL_DIFFUSE, etc */
+ GLuint ColorMaterialBitmask; /* bitmask formed from Face and Mode */
+ GLboolean ColorMaterialEnabled;
+
+ struct gl_light EnabledList; /* List sentinel */
+
+ /* Derived for optimizations: */
+ GLboolean _NeedVertices; /* Use fast shader? */
+ GLuint _Flags; /* State, see below */
+ GLfloat _BaseColor[2][3];
+ GLchan _BaseAlpha[2];
+};
+
+
+#define LIGHT_POSITIONAL 0x4
+#define LIGHT_SPOT 0x10
+#define LIGHT_LOCAL_VIEWER 0x20
+#define LIGHT_TWO_SIDE 0x40
+
+#define LIGHT_NEED_VERTICES (LIGHT_POSITIONAL|LIGHT_LOCAL_VIEWER)
+
+struct gl_line_attrib {
+ GLboolean SmoothFlag; /* GL_LINE_SMOOTH enabled? */
+ GLboolean StippleFlag; /* GL_LINE_STIPPLE enabled? */
+ GLushort StipplePattern; /* Stipple pattern */
+ GLint StippleFactor; /* Stipple repeat factor */
+ GLfloat Width; /* Line width */
+};
+
+
+struct gl_list_attrib {
+ GLuint ListBase;
+};
+
+struct gl_list_opcode {
+ GLuint size;
+ void (*execute)( GLcontext *ctx, void *data );
+ void (*destroy)( GLcontext *ctx, void *data );
+ void (*print)( GLcontext *ctx, void *data );
+};
+
+#define GL_MAX_EXT_OPCODES 16
+
+struct gl_list_extensions {
+ struct gl_list_opcode opcode[GL_MAX_EXT_OPCODES];
+ GLuint nr_opcodes;
+};
+
+struct gl_pixel_attrib {
+ GLenum ReadBuffer; /* src buffer for glRead/CopyPixels */
+ GLenum DriverReadBuffer; /* Driver's current source buffer */
+ GLfloat RedBias, RedScale;
+ GLfloat GreenBias, GreenScale;
+ GLfloat BlueBias, BlueScale;
+ GLfloat AlphaBias, AlphaScale;
+ GLfloat DepthBias, DepthScale;
+ GLint IndexShift, IndexOffset;
+ GLboolean MapColorFlag;
+ GLboolean MapStencilFlag;
+ GLfloat ZoomX, ZoomY;
+ GLint MapStoSsize; /* Size of each pixel map */
+ GLint MapItoIsize;
+ GLint MapItoRsize;
+ GLint MapItoGsize;
+ GLint MapItoBsize;
+ GLint MapItoAsize;
+ GLint MapRtoRsize;
+ GLint MapGtoGsize;
+ GLint MapBtoBsize;
+ GLint MapAtoAsize;
+ GLint MapStoS[MAX_PIXEL_MAP_TABLE]; /* Pixel map tables */
+ GLint MapItoI[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoR[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoG[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoB[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoA[MAX_PIXEL_MAP_TABLE];
+ GLubyte MapItoR8[MAX_PIXEL_MAP_TABLE]; /* converted to 8-bit color */
+ GLubyte MapItoG8[MAX_PIXEL_MAP_TABLE];
+ GLubyte MapItoB8[MAX_PIXEL_MAP_TABLE];
+ GLubyte MapItoA8[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapRtoR[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapGtoG[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapBtoB[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapAtoA[MAX_PIXEL_MAP_TABLE];
+ /* GL_EXT_histogram */
+ GLboolean HistogramEnabled;
+ GLboolean MinMaxEnabled;
+ /* GL_SGIS_pixel_texture */
+ GLboolean PixelTextureEnabled;
+ GLenum FragmentRgbSource;
+ GLenum FragmentAlphaSource;
+ /* GL_SGI_color_matrix */
+ GLfloat PostColorMatrixScale[4]; /* RGBA */
+ GLfloat PostColorMatrixBias[4]; /* RGBA */
+ /* GL_SGI_color_table */
+ GLfloat ColorTableScale[4];
+ GLfloat ColorTableBias[4];
+ GLboolean ColorTableEnabled;
+ GLfloat PCCTscale[4];
+ GLfloat PCCTbias[4];
+ GLboolean PostConvolutionColorTableEnabled;
+ GLfloat PCMCTscale[4];
+ GLfloat PCMCTbias[4];
+ GLboolean PostColorMatrixColorTableEnabled;
+ /* Convolution */
+ GLboolean Convolution1DEnabled;
+ GLboolean Convolution2DEnabled;
+ GLboolean Separable2DEnabled;
+ GLfloat ConvolutionBorderColor[3][4];
+ GLenum ConvolutionBorderMode[3];
+ GLfloat ConvolutionFilterScale[3][4];
+ GLfloat ConvolutionFilterBias[3][4];
+ GLfloat PostConvolutionScale[4]; /* RGBA */
+ GLfloat PostConvolutionBias[4]; /* RGBA */
+};
+
+
+struct gl_point_attrib {
+ GLboolean SmoothFlag; /* True if GL_POINT_SMOOTH is enabled */
+ GLfloat Size; /* User-specified point size */
+ GLfloat _Size; /* Size clamped to Const.Min/MaxPointSize */
+ GLfloat Params[3]; /* GL_EXT_point_parameters */
+ GLfloat MinSize, MaxSize; /* GL_EXT_point_parameters */
+ GLfloat Threshold; /* GL_EXT_point_parameters */
+ GLboolean _Attenuated; /* True if Params != [1, 0, 0] */
+};
+
+
+struct gl_polygon_attrib {
+ GLenum FrontFace; /* Either GL_CW or GL_CCW */
+ GLenum FrontMode; /* Either GL_POINT, GL_LINE or GL_FILL */
+ GLenum BackMode; /* Either GL_POINT, GL_LINE or GL_FILL */
+ GLboolean FrontBit; /* */
+ GLboolean _Unfilled; /* True if back or front mode is not GL_FILL */
+ GLboolean CullFlag; /* Culling on/off flag */
+ GLubyte _CullBits; /* Used for cull testing */
+ GLboolean SmoothFlag; /* True if GL_POLYGON_SMOOTH is enabled */
+ GLboolean StippleFlag; /* True if GL_POLYGON_STIPPLE is enabled */
+ GLenum CullFaceMode; /* Culling mode GL_FRONT or GL_BACK */
+ GLfloat OffsetFactor; /* Polygon offset factor, from user */
+ GLfloat OffsetUnits; /* Polygon offset units, from user */
+ GLfloat OffsetMRD; /* = OffsetUnits * visual->MRD */
+ GLboolean OffsetPoint; /* Offset in GL_POINT mode */
+ GLboolean OffsetLine; /* Offset in GL_LINE mode */
+ GLboolean OffsetFill; /* Offset in GL_FILL mode */
+ GLboolean _OffsetAny;
+};
+
+
+struct gl_scissor_attrib {
+ GLboolean Enabled; /* Scissor test enabled? */
+ GLint X, Y; /* Lower left corner of box */
+ GLsizei Width, Height; /* Size of box */
+};
+
+
+struct gl_stencil_attrib {
+ GLboolean Enabled; /* Enabled flag */
+ GLenum Function; /* Stencil function */
+ GLenum FailFunc; /* Fail function */
+ GLenum ZPassFunc; /* Depth buffer pass function */
+ GLenum ZFailFunc; /* Depth buffer fail function */
+ GLstencil Ref; /* Reference value */
+ GLstencil ValueMask; /* Value mask */
+ GLstencil Clear; /* Clear value */
+ GLstencil WriteMask; /* Write mask */
+};
+
+
+/* TexGenEnabled flags */
+#define S_BIT 1
+#define T_BIT 2
+#define R_BIT 4
+#define Q_BIT 8
+
+/* Texture Enabled flags */
+#define TEXTURE0_1D 0x1 /* Texture unit 0 (default) */
+#define TEXTURE0_2D 0x2
+#define TEXTURE0_3D 0x4
+#define TEXTURE0_CUBE 0x8
+#define TEXTURE0_ANY (TEXTURE0_1D | TEXTURE0_2D | TEXTURE0_3D | TEXTURE0_CUBE)
+#define TEXTURE1_1D (TEXTURE0_1D << 4) /* Texture unit 1 */
+#define TEXTURE1_2D (TEXTURE0_2D << 4)
+#define TEXTURE1_3D (TEXTURE0_3D << 4)
+#define TEXTURE1_CUBE (TEXTURE0_CUBE << 4)
+#define TEXTURE1_ANY (TEXTURE1_1D | TEXTURE1_2D | TEXTURE1_3D | TEXTURE1_CUBE)
+#define TEXTURE2_1D (TEXTURE0_1D << 8) /* Texture unit 2 */
+#define TEXTURE2_2D (TEXTURE0_2D << 8)
+#define TEXTURE2_3D (TEXTURE0_3D << 8)
+#define TEXTURE2_CUBE (TEXTURE0_CUBE << 8)
+#define TEXTURE2_ANY (TEXTURE2_1D | TEXTURE2_2D | TEXTURE2_3D | TEXTURE2_CUBE)
+#define TEXTURE3_1D (TEXTURE0_1D << 12) /* Texture unit 3 */
+#define TEXTURE3_2D (TEXTURE0_2D << 12)
+#define TEXTURE3_3D (TEXTURE0_3D << 12)
+#define TEXTURE3_CUBE (TEXTURE0_CUBE << 12)
+#define TEXTURE3_ANY (TEXTURE3_1D | TEXTURE3_2D | TEXTURE3_3D | TEXTURE3_CUBE)
+
+/* Bitmap versions of the GL_ constants.
+ */
+#define TEXGEN_SPHERE_MAP 0x1
+#define TEXGEN_OBJ_LINEAR 0x2
+#define TEXGEN_EYE_LINEAR 0x4
+#define TEXGEN_REFLECTION_MAP_NV 0x8
+#define TEXGEN_NORMAL_MAP_NV 0x10
+
+#define TEXGEN_NEED_M (TEXGEN_SPHERE_MAP)
+#define TEXGEN_NEED_F (TEXGEN_SPHERE_MAP | \
+ TEXGEN_REFLECTION_MAP_NV)
+#define TEXGEN_NEED_NORMALS (TEXGEN_SPHERE_MAP | \
+ TEXGEN_REFLECTION_MAP_NV | \
+ TEXGEN_NORMAL_MAP_NV)
+#define TEXGEN_NEED_VERTICES (TEXGEN_OBJ_LINEAR | \
+ TEXGEN_EYE_LINEAR | \
+ TEXGEN_REFLECTION_MAP_NV | \
+ TEXGEN_SPHERE_MAP )
+#define TEXGEN_NEED_EYE_COORD (TEXGEN_SPHERE_MAP | \
+ TEXGEN_REFLECTION_MAP_NV | \
+ TEXGEN_NORMAL_MAP_NV | \
+ TEXGEN_EYE_LINEAR)
+
+
+
+/* A selection of state flags to make driver and module's lives easier.
+ */
+#define ENABLE_TEX0 0x000f /* TEXTURE0_ANY */
+#define ENABLE_TEX1 0x00f0 /* TEXTURE1_ANY */
+#define ENABLE_TEX2 0x0f00 /* TEXTURE2_ANY */
+#define ENABLE_TEX3 0xf000 /* TEXTURE3_ANY */
+#define ENABLE_TEXGEN0 0x10000
+#define ENABLE_TEXGEN1 0x20000
+#define ENABLE_TEXGEN2 0x40000
+#define ENABLE_TEXGEN3 0x80000
+#define ENABLE_TEXMAT0 0x100000 /* Ie. not the identity matrix */
+#define ENABLE_TEXMAT1 0x200000
+#define ENABLE_TEXMAT2 0x400000
+#define ENABLE_TEXMAT3 0x800000
+#define ENABLE_LIGHT 0x1000000
+#define ENABLE_FOG 0x2000000
+#define ENABLE_USERCLIP 0x4000000
+#define ENABLE_VIEWCLIP 0x8000000
+#define ENABLE_NORMALIZE 0x10000000
+#define ENABLE_RESCALE 0x20000000
+#define ENABLE_POINT_ATTEN 0x40000000
+
+
+#define ENABLE_TEX_ANY (ENABLE_TEX0 | ENABLE_TEX1 | \
+ ENABLE_TEX2 | ENABLE_TEX3)
+#define ENABLE_TEXGEN_ANY (ENABLE_TEXGEN0 | ENABLE_TEXGEN1 | \
+ ENABLE_TEXGEN2 | ENABLE_TEXGEN3)
+#define ENABLE_TEXMAT_ANY (ENABLE_TEXMAT0 | ENABLE_TEXMAT1 | \
+ ENABLE_TEXMAT2 | ENABLE_TEXMAT3)
+
+
+/* Texture image record */
+struct gl_texture_image {
+ GLenum Format; /* GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA,
+ * GL_INTENSITY, GL_RGB, GL_RGBA, or
+ * GL_COLOR_INDEX only
+ */
+ GLenum IntFormat; /* Internal format as given by the user */
+ GLubyte RedBits; /* Bits per texel component */
+ GLubyte GreenBits; /* These are initialized by Mesa but */
+ GLubyte BlueBits; /* may be reassigned by the device */
+ GLubyte AlphaBits; /* driver to indicate the true texture */
+ GLubyte IntensityBits; /* color resolution. */
+ GLubyte LuminanceBits;
+ GLubyte IndexBits;
+ GLuint Border; /* 0 or 1 */
+ GLuint Width; /* = 2^WidthLog2 + 2*Border */
+ GLuint Height; /* = 2^HeightLog2 + 2*Border */
+ GLuint Depth; /* = 2^DepthLog2 + 2*Border */
+ GLuint Width2; /* = Width - 2*Border */
+ GLuint Height2; /* = Height - 2*Border */
+ GLuint Depth2; /* = Depth - 2*Border */
+ GLuint WidthLog2; /* = log2(Width2) */
+ GLuint HeightLog2; /* = log2(Height2) */
+ GLuint DepthLog2; /* = log2(Depth2) */
+ GLuint MaxLog2; /* = MAX(WidthLog2, HeightLog2) */
+ GLchan *Data; /* Image data as GLchan's */
+
+ GLboolean IsCompressed; /* GL_ARB_texture_compression */
+ GLuint CompressedSize; /* GL_ARB_texture_compression */
+
+ /* For device driver: */
+ void *DriverData; /* Arbitrary device driver data */
+};
+
+
+/* Texture object record */
+struct gl_texture_object {
+ _glthread_Mutex Mutex; /* for thread safety */
+ GLint RefCount; /* reference count */
+ GLuint Name; /* an unsigned integer */
+ GLuint Dimensions; /* 1 or 2 or 3 */
+ GLfloat Priority; /* in [0,1] */
+ GLchan BorderColor[4]; /* as integers */
+ GLenum WrapS; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
+ GLenum WrapT; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
+ GLenum WrapR; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
+ GLenum MinFilter; /* minification filter */
+ GLenum MagFilter; /* magnification filter */
+ GLfloat MinLod; /* OpenGL 1.2 */
+ GLfloat MaxLod; /* OpenGL 1.2 */
+ GLint BaseLevel; /* OpenGL 1.2 */
+ GLint MaxLevel; /* OpenGL 1.2 */
+ GLint _P; /* Highest mipmap level */
+ GLfloat _M; /* = MIN(MaxLevel, P) - BaseLevel */
+ struct gl_texture_image *Image[MAX_TEXTURE_LEVELS];
+
+ /* Texture cube faces */
+ /* Image[] is alias for *PosX[MAX_TEXTURE_LEVELS]; */
+ struct gl_texture_image *NegX[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *PosY[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *NegY[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *PosZ[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *NegZ[MAX_TEXTURE_LEVELS];
+
+ /* GL_EXT_paletted_texture */
+ struct gl_color_table Palette;
+
+ GLboolean Complete; /* Is texture object complete? */
+ struct gl_texture_object *Next; /* Next in linked list */
+
+ /* For device driver: */
+ void *DriverData; /* Arbitrary device driver data */
+};
+
+
+
+/*
+ * Texture units are new with the multitexture extension.
+ */
+struct gl_texture_unit {
+ GLuint Enabled; /* bitmask of TEXTURE0_1D, _2D, _3D, _CUBE */
+ GLuint _ReallyEnabled; /* 0 or one of TEXTURE0_1D, _2D, _3D, _CUBE */
+
+ GLenum EnvMode; /* GL_MODULATE, GL_DECAL, GL_BLEND, etc. */
+ GLfloat EnvColor[4];
+ GLuint TexGenEnabled; /* Bitwise-OR of [STRQ]_BIT values */
+ GLenum GenModeS; /* Tex coord generation mode, either */
+ GLenum GenModeT; /* GL_OBJECT_LINEAR, or */
+ GLenum GenModeR; /* GL_EYE_LINEAR, or */
+ GLenum GenModeQ; /* GL_SPHERE_MAP */
+ GLuint _GenBitS;
+ GLuint _GenBitT;
+ GLuint _GenBitR;
+ GLuint _GenBitQ;
+ GLuint _GenFlags; /* bitwise or of GenBit[STRQ] */
+ GLfloat ObjectPlaneS[4];
+ GLfloat ObjectPlaneT[4];
+ GLfloat ObjectPlaneR[4];
+ GLfloat ObjectPlaneQ[4];
+ GLfloat EyePlaneS[4];
+ GLfloat EyePlaneT[4];
+ GLfloat EyePlaneR[4];
+ GLfloat EyePlaneQ[4];
+ GLfloat LodBias; /* for biasing mipmap levels */
+
+ /* GL_EXT_texture_env_combine */
+ GLenum CombineModeRGB; /* GL_REPLACE, GL_DECAL, GL_ADD, etc. */
+ GLenum CombineModeA; /* GL_REPLACE, GL_DECAL, GL_ADD, etc. */
+ GLenum CombineSourceRGB[3]; /* GL_PRIMARY_COLOR, GL_TEXTURE, etc. */
+ GLenum CombineSourceA[3]; /* GL_PRIMARY_COLOR, GL_TEXTURE, etc. */
+ GLenum CombineOperandRGB[3]; /* SRC_COLOR, ONE_MINUS_SRC_COLOR, etc */
+ GLenum CombineOperandA[3]; /* SRC_ALPHA, ONE_MINUS_SRC_ALPHA, etc */
+ GLuint CombineScaleShiftRGB; /* 0, 1 or 2 */
+ GLuint CombineScaleShiftA; /* 0, 1 or 2 */
+
+ struct gl_texture_object *Current1D;
+ struct gl_texture_object *Current2D;
+ struct gl_texture_object *Current3D;
+ struct gl_texture_object *CurrentCubeMap; /* GL_ARB_texture_cube_map */
+
+ struct gl_texture_object *_Current; /* Points to really enabled tex obj */
+
+ struct gl_texture_object Saved1D; /* only used by glPush/PopAttrib */
+ struct gl_texture_object Saved2D;
+ struct gl_texture_object Saved3D;
+ struct gl_texture_object SavedCubeMap;
+};
+
+
+struct gl_texture_attrib {
+ /* multitexture */
+ GLuint CurrentUnit; /* Active texture unit */
+ GLuint CurrentTransformUnit; /* Client active texture xform unit */
+
+ GLuint _ReallyEnabled; /* enables for all texture units: */
+ /* = (Unit[0]._ReallyEnabled << 0) | */
+ /* (Unit[1]._ReallyEnabled << 4) | */
+ /* (Unit[2]._ReallyEnabled << 8) | etc... */
+ GLuint _GenFlags; /* for texgen */
+
+ struct gl_texture_unit Unit[MAX_TEXTURE_UNITS];
+
+ struct gl_texture_object *Proxy1D;
+ struct gl_texture_object *Proxy2D;
+ struct gl_texture_object *Proxy3D;
+ struct gl_texture_object *ProxyCubeMap;
+
+ /* GL_EXT_shared_texture_palette */
+ GLboolean SharedPalette;
+ struct gl_color_table Palette;
+};
+
+
+
+/* KW: Renamed ClipEquation to avoid having 'ClipClipEquation'
+ */
+struct gl_transform_attrib {
+ GLenum MatrixMode; /* Matrix mode */
+ GLfloat EyeUserPlane[MAX_CLIP_PLANES][4];
+ GLfloat _ClipUserPlane[MAX_CLIP_PLANES][4]; /* derived */
+ GLboolean ClipEnabled[MAX_CLIP_PLANES];
+ GLubyte _AnyClip; /* How many ClipEnabled? */
+ GLboolean Normalize; /* Normalize all normals? */
+ GLboolean RescaleNormals; /* GL_EXT_rescale_normal */
+};
+
+
+struct gl_viewport_attrib {
+ GLint X, Y; /* position */
+ GLsizei Width, Height; /* size */
+ GLfloat Near, Far; /* Depth buffer range */
+ GLmatrix _WindowMap; /* Mapping transformation as a matrix. */
+};
+
+
+/* For the attribute stack: */
+struct gl_attrib_node {
+ GLbitfield kind;
+ void *data;
+ struct gl_attrib_node *next;
+};
+
+
+
+/*
+ * Client pixel packing/unpacking attributes
+ */
+struct gl_pixelstore_attrib {
+ GLint Alignment;
+ GLint RowLength;
+ GLint SkipPixels;
+ GLint SkipRows;
+ GLint ImageHeight; /* for GL_EXT_texture3D */
+ GLint SkipImages; /* for GL_EXT_texture3D */
+ GLboolean SwapBytes;
+ GLboolean LsbFirst;
+};
+
+
+/*
+ * Client vertex array attributes
+ */
+struct gl_client_array {
+ GLint Size;
+ GLenum Type;
+ GLsizei Stride; /* user-specified stride */
+ GLsizei StrideB; /* actual stride in bytes */
+ void *Ptr;
+ GLboolean Enabled;
+};
+
+
+
+
+struct gl_array_attrib {
+ struct gl_client_array Vertex; /* client data descriptors */
+ struct gl_client_array Normal;
+ struct gl_client_array Color;
+ struct gl_client_array SecondaryColor;
+ struct gl_client_array FogCoord;
+ struct gl_client_array Index;
+ struct gl_client_array TexCoord[MAX_TEXTURE_UNITS];
+ struct gl_client_array EdgeFlag;
+
+ trans_4f_func _VertexFunc; /* conversion functions */
+ trans_3f_func _NormalFunc;
+ trans_4ub_func _ColorFunc;
+ trans_1ui_func _IndexFunc;
+ trans_1f_func _FogCoordFunc;
+ trans_4ub_func _SecondaryColorFunc;
+ trans_4f_func _TexCoordFunc[MAX_TEXTURE_UNITS];
+ trans_1ub_func _EdgeFlagFunc;
+
+ GLint TexCoordInterleaveFactor;
+ GLint ActiveTexture; /* Client Active Texture */
+
+ GLuint LockFirst;
+ GLuint LockCount;
+
+};
+
+
+/* These are used to make the ctx->Current values look like
+ * arrays (with zero StrideB).
+ */
+struct gl_fallback_arrays {
+ struct gl_client_array Normal;
+ struct gl_client_array Color;
+ struct gl_client_array SecondaryColor;
+ struct gl_client_array FogCoord;
+ struct gl_client_array Index;
+ struct gl_client_array TexCoord[MAX_TEXTURE_UNITS];
+ struct gl_client_array EdgeFlag;
+};
+
+
+
+struct gl_feedback {
+ GLenum Type;
+ GLuint Mask;
+ GLfloat *Buffer;
+ GLuint BufferSize;
+ GLuint Count;
+};
+
+
+
+struct gl_selection {
+ GLuint *Buffer;
+ GLuint BufferSize; /* size of SelectBuffer */
+ GLuint BufferCount; /* number of values in SelectBuffer */
+ GLuint Hits; /* number of records in SelectBuffer */
+ GLuint NameStackDepth;
+ GLuint NameStack[MAX_NAME_STACK_DEPTH];
+ GLboolean HitFlag;
+ GLfloat HitMinZ, HitMaxZ;
+};
+
+
+
+/*
+ * 1-D Evaluator control points
+ */
+struct gl_1d_map {
+ GLuint Order; /* Number of control points */
+ GLfloat u1, u2, du; /* u1, u2, 1.0/(u2-u1) */
+ GLfloat *Points; /* Points to contiguous control points */
+};
+
+
+/*
+ * 2-D Evaluator control points
+ */
+struct gl_2d_map {
+ GLuint Uorder; /* Number of control points in U dimension */
+ GLuint Vorder; /* Number of control points in V dimension */
+ GLfloat u1, u2, du;
+ GLfloat v1, v2, dv;
+ GLfloat *Points; /* Points to contiguous control points */
+};
+
+
+/*
+ * All evalutator control points
+ */
+struct gl_evaluators {
+ /* 1-D maps */
+ struct gl_1d_map Map1Vertex3;
+ struct gl_1d_map Map1Vertex4;
+ struct gl_1d_map Map1Index;
+ struct gl_1d_map Map1Color4;
+ struct gl_1d_map Map1Normal;
+ struct gl_1d_map Map1Texture1;
+ struct gl_1d_map Map1Texture2;
+ struct gl_1d_map Map1Texture3;
+ struct gl_1d_map Map1Texture4;
+
+ /* 2-D maps */
+ struct gl_2d_map Map2Vertex3;
+ struct gl_2d_map Map2Vertex4;
+ struct gl_2d_map Map2Index;
+ struct gl_2d_map Map2Color4;
+ struct gl_2d_map Map2Normal;
+ struct gl_2d_map Map2Texture1;
+ struct gl_2d_map Map2Texture2;
+ struct gl_2d_map Map2Texture3;
+ struct gl_2d_map Map2Texture4;
+};
+
+
+
+/*
+ * State which can be shared by multiple contexts:
+ */
+struct gl_shared_state {
+ _glthread_Mutex Mutex; /* for thread safety */
+ GLint RefCount; /* Reference count */
+ struct _mesa_HashTable *DisplayList; /* Display lists hash table */
+ struct _mesa_HashTable *TexObjects; /* Texture objects hash table */
+ struct gl_texture_object *TexObjectList;/* Linked list of texture objects */
+
+ /* Default texture objects (shared by all multi-texture units) */
+ struct gl_texture_object *Default1D;
+ struct gl_texture_object *Default2D;
+ struct gl_texture_object *Default3D;
+ struct gl_texture_object *DefaultCubeMap;
+
+ void *DriverData; /* Device driver shared state */
+};
+
+
+
+/*
+ * Describes the color, depth, stencil and accum buffer parameters.
+ * In C++ terms, think of this as a base class from which device drivers
+ * will make derived classes.
+ */
+struct gl_visual {
+ GLboolean RGBAflag; /* Is frame buffer in RGBA mode, not CI? */
+ GLboolean DBflag; /* Is color buffer double buffered? */
+ GLboolean StereoFlag; /* stereo buffer? */
+
+ GLint RedBits; /* Bits per color component */
+ GLint GreenBits;
+ GLint BlueBits;
+ GLint AlphaBits;
+
+ GLint IndexBits; /* Bits/pixel if in color index mode */
+
+ GLint AccumRedBits; /* Number of bits in red accum channel */
+ GLint AccumGreenBits; /* Number of bits in green accum channel */
+ GLint AccumBlueBits; /* Number of bits in blue accum channel */
+ GLint AccumAlphaBits; /* Number of bits in alpha accum channel */
+ GLint DepthBits; /* Number of bits in depth buffer, or 0 */
+ GLint StencilBits; /* Number of bits in stencil buffer, or 0 */
+ GLint NumSamples; /* Samples/pixel for multisampling */
+
+ GLuint DepthMax; /* Max depth buffer value */
+ GLfloat DepthMaxF; /* Float max depth buffer value */
+ GLfloat MRD; /* minimum resolvable difference in Z values */
+};
+
+
+
+/*
+ * A "frame buffer" is a color buffer and its optional ancillary buffers:
+ * depth, accum, stencil, and software-simulated alpha buffers.
+ * In C++ terms, think of this as a base class from which device drivers
+ * will make derived classes.
+ */
+struct gl_frame_buffer {
+ GLvisual *Visual; /* The corresponding visual */
+
+ GLint Width, Height; /* size of frame buffer in pixels */
+
+ GLboolean UseSoftwareDepthBuffer;
+ GLboolean UseSoftwareAccumBuffer;
+ GLboolean UseSoftwareStencilBuffer;
+ GLboolean UseSoftwareAlphaBuffers;
+
+ /* Software depth (aka Z) buffer */
+ GLvoid *DepthBuffer; /* array [Width*Height] of GLushort or GLuint*/
+
+ /* Software stencil buffer */
+ GLstencil *Stencil; /* array [Width*Height] of GLstencil values */
+
+ /* Software accumulation buffer */
+ GLaccum *Accum; /* array [4*Width*Height] of GLaccum values */
+
+ /* Software alpha planes */
+ GLchan *FrontLeftAlpha; /* array [Width*Height] of GLubyte */
+ GLchan *BackLeftAlpha; /* array [Width*Height] of GLubyte */
+ GLchan *FrontRightAlpha; /* array [Width*Height] of GLubyte */
+ GLchan *BackRightAlpha; /* array [Width*Height] of GLubyte */
+ GLchan *Alpha; /* Points to current alpha buffer */
+
+ /* Drawing bounds: intersection of window size and scissor box */
+ GLint _Xmin, _Ymin; /* inclusive */
+ GLint _Xmax, _Ymax; /* exclusive */
+};
+
+
+/*
+ * Constants which may be overriden by device driver.
+ */
+struct gl_constants {
+ GLint MaxTextureSize;
+ GLint MaxCubeTextureSize;
+ GLint MaxTextureLevels;
+ GLuint MaxTextureUnits;
+ GLuint MaxArrayLockSize;
+ GLint SubPixelBits;
+ GLfloat MinPointSize, MaxPointSize; /* aliased */
+ GLfloat MinPointSizeAA, MaxPointSizeAA; /* antialiased */
+ GLfloat PointSizeGranularity;
+ GLfloat MinLineWidth, MaxLineWidth; /* aliased */
+ GLfloat MinLineWidthAA, MaxLineWidthAA; /* antialiased */
+ GLfloat LineWidthGranularity;
+ GLuint NumAuxBuffers;
+ GLuint MaxColorTableSize;
+ GLuint MaxConvolutionWidth;
+ GLuint MaxConvolutionHeight;
+ GLuint NumCompressedTextureFormats; /* GL_ARB_texture_compression */
+ GLenum CompressedTextureFormats[MAX_COMPRESSED_TEXTURE_FORMATS];
+};
+
+
+/*
+ * List of extensions.
+ */
+struct extension;
+struct gl_extensions {
+ char *ext_string;
+ struct extension *ext_list;
+ /* Flags to quickly test if certain extensions are available.
+ * Not every extension needs to have such a flag, but it's encouraged.
+ */
+ GLboolean ARB_imaging;
+ GLboolean ARB_multitexture;
+ GLboolean ARB_texture_compression;
+ GLboolean ARB_texture_cube_map;
+ GLboolean ARB_texture_env_add;
+ GLboolean EXT_blend_color;
+ GLboolean EXT_blend_func_separate;
+ GLboolean EXT_blend_logic_op;
+ GLboolean EXT_blend_minmax;
+ GLboolean EXT_blend_subtract;
+ GLboolean EXT_clip_volume_hint;
+ GLboolean EXT_convolution;
+ GLboolean EXT_compiled_vertex_array;
+ GLboolean EXT_fog_coord;
+ GLboolean EXT_histogram;
+ GLboolean EXT_packed_pixels;
+ GLboolean EXT_paletted_texture;
+ GLboolean EXT_point_parameters;
+ GLboolean EXT_polygon_offset;
+ GLboolean EXT_rescale_normal;
+ GLboolean EXT_secondary_color;
+ GLboolean EXT_shared_texture_palette;
+ GLboolean EXT_stencil_wrap;
+ GLboolean EXT_texture3D;
+ GLboolean EXT_texture_compression_s3tc;
+ GLboolean EXT_texture_env_add;
+ GLboolean EXT_texture_env_combine;
+ GLboolean EXT_texture_object;
+ GLboolean EXT_texture_lod_bias;
+ GLboolean EXT_vertex_array_set;
+ GLboolean HP_occlusion_test;
+ GLboolean INGR_blend_func_separate;
+ GLboolean MESA_window_pos;
+ GLboolean MESA_resize_buffers;
+ GLboolean NV_blend_square;
+ GLboolean NV_texgen_reflection;
+ GLboolean PGI_misc_hints;
+ GLboolean SGI_color_matrix;
+ GLboolean SGI_color_table;
+ GLboolean SGIS_pixel_texture;
+ GLboolean SGIS_texture_edge_clamp;
+ GLboolean SGIX_pixel_texture;
+ GLboolean _3DFX_texture_compression_FXT1;
+};
+
+
+
+/*
+ * Bits for image transfer operations (ctx->ImageTransferState).
+ */
+#define IMAGE_SCALE_BIAS_BIT 0x1
+#define IMAGE_SHIFT_OFFSET_BIT 0x2
+#define IMAGE_MAP_COLOR_BIT 0x4
+#define IMAGE_COLOR_TABLE_BIT 0x8
+#define IMAGE_CONVOLUTION_BIT 0x10
+#define IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT 0x20
+#define IMAGE_COLOR_MATRIX_BIT 0x40
+#define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x80
+#define IMAGE_HISTOGRAM_BIT 0x100
+#define IMAGE_MIN_MAX_BIT 0x200
+
+/* transfer ops up to convolution: */
+#define IMAGE_PRE_CONVOLUTION_BITS (IMAGE_SCALE_BIAS_BIT | \
+ IMAGE_SHIFT_OFFSET_BIT | \
+ IMAGE_MAP_COLOR_BIT | \
+ IMAGE_COLOR_TABLE_BIT)
+
+/* transfer ops after convolution: */
+#define IMAGE_POST_CONVOLUTION_BITS (IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT | \
+ IMAGE_COLOR_MATRIX_BIT | \
+ IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT |\
+ IMAGE_HISTOGRAM_BIT | \
+ IMAGE_MIN_MAX_BIT)
+
+
+/*
+ * Bits to indicate what state has changed.
+ */
+#define _NEW_MODELVIEW 0x1 /* ctx->ModelView */
+#define _NEW_PROJECTION 0x2 /* ctx->Projection */
+#define _NEW_TEXTURE_MATRIX 0x4 /* ctx->TextureMatrix */
+#define _NEW_COLOR_MATRIX 0x8 /* ctx->ColorMatrix */
+#define _NEW_ACCUM 0x10 /* ctx->Accum */
+#define _NEW_COLOR 0x20 /* ctx->Color */
+#define _NEW_DEPTH 0x40 /* ctx->Depth */
+#define _NEW_EVAL 0x80 /* ctx->Eval, ctx->EvalMap */
+#define _NEW_FOG 0x100 /* ctx->Fog */
+#define _NEW_HINT 0x200 /* ctx->Hint */
+#define _NEW_400 0x400 /* unused */
+#define _NEW_LIGHT 0x800 /* ctx->Light */
+#define _NEW_1000 0x1000 /* unused */
+#define _NEW_LINE 0x2000 /* ctx->Line */
+#define _NEW_FEEDBACK_SELECT 0x4000 /* ctx->Feedback, ctx->Select */
+#define _NEW_PIXEL 0x8000 /* ctx->Pixel */
+#define _NEW_POINT 0x10000 /* ctx->Point */
+#define _NEW_POLYGON 0x20000 /* ctx->Polygon */
+#define _NEW_POLYGONSTIPPLE 0x40000 /* ctx->PolygonStipple */
+#define _NEW_SCISSOR 0x80000 /* ctx->Scissor */
+#define _NEW_STENCIL 0x100000 /* ctx->Stencil */
+#define _NEW_TEXTURE 0x200000 /* ctx->Texture */
+#define _NEW_TRANSFORM 0x400000 /* ctx->Transform */
+#define _NEW_VIEWPORT 0x800000 /* ctx->Viewport */
+#define _NEW_PACKUNPACK 0x1000000 /* ctx->Pack, ctx->Unpack */
+#define _NEW_ARRAY 0x2000000 /* ctx->Array */
+#define _NEW_COLORTABLE 0x4000000 /* ctx->{*}ColorTable */
+#define _NEW_RENDERMODE 0x8000000 /* ctx->RenderMode */
+#define _NEW_BUFFERS 0x10000000 /* ctx->Visual, ctx->DrawBuffer, */
+
+#define _NEW_ALL ~0
+
+
+
+/* What can the driver do, what requires us to call render_triangle or
+ * a non-driver rasterize function?
+ */
+#define DD_FEEDBACK 0x1
+#define DD_SELECT 0x2
+#define DD_FLATSHADE 0x4
+#define DD_MULTIDRAW 0x8
+#define DD_SEPERATE_SPECULAR 0x10
+#define DD_TRI_LIGHT_TWOSIDE 0x20
+#define DD_TRI_UNFILLED 0x40
+#define DD_TRI_SMOOTH 0x80
+#define DD_TRI_STIPPLE 0x100
+#define DD_TRI_OFFSET 0x200
+#define DD_TRI_CULL 0x400
+#define DD_LINE_SMOOTH 0x800
+#define DD_LINE_STIPPLE 0x1000
+#define DD_LINE_WIDTH 0x2000
+#define DD_POINT_SMOOTH 0x4000
+#define DD_POINT_SIZE 0x8000
+#define DD_POINT_ATTEN 0x10000
+#define DD_LIGHTING_CULL 0x20000
+#define DD_TRI_CULL_FRONT_BACK 0x400000 /* not supported by most drivers */
+#define DD_Z_NEVER 0x800000
+#define DD_STENCIL 0x1000000
+
+/* Define the state changes under which each of these bits might change
+ */
+#define _DD_NEW_FEEDBACK _NEW_RENDERMODE
+#define _DD_NEW_SELECT _NEW_RENDERMODE
+#define _DD_NEW_FLATSHADE _NEW_LIGHT
+#define _DD_NEW_MULTIDRAW _NEW_COLOR
+#define _DD_NEW_SEPERATE_SPECULAR (_NEW_LIGHT|_NEW_FOG)
+#define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT
+#define _DD_NEW_TRI_UNFILLED _NEW_POLYGON
+#define _DD_NEW_TRI_SMOOTH _NEW_POLYGON
+#define _DD_NEW_TRI_STIPPLE _NEW_POLYGON
+#define _DD_NEW_TRI_OFFSET _NEW_POLYGON
+#define _DD_NEW_TRI_CULL _NEW_POLYGON
+#define _DD_NEW_LINE_SMOOTH _NEW_LINE
+#define _DD_NEW_LINE_STIPPLE _NEW_LINE
+#define _DD_NEW_LINE_WIDTH _NEW_LINE
+#define _DD_NEW_POINT_SMOOTH _NEW_POINT
+#define _DD_NEW_POINT_SIZE _NEW_POINT
+#define _DD_NEW_POINT_ATTEN _NEW_POINT
+#define _DD_NEW_LIGHTING_CULL _NEW_LIGHT
+#define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON
+#define _DD_NEW_Z_NEVER _NEW_DEPTH
+#define _DD_NEW_STENCIL _NEW_STENCIL
+
+#define _TNL_NEW_RENDERFLAGS (_NEW_TEXTURE | \
+ _DD_NEW_SEPERATE_SPECULAR | \
+ _NEW_POLYGON | \
+ _NEW_FOG | \
+ _NEW_RENDERMODE)
+
+#define _TNL_NEW_NEED_EYE_COORDS (_NEW_LIGHT| \
+ _NEW_TEXTURE| \
+ _NEW_POINT| \
+ _NEW_MODELVIEW)
+
+#define _TNL_NEW_NEED_NORMALS (_NEW_LIGHT| \
+ _NEW_TEXTURE)
+
+#define _TNL_NEW_NORMAL_TRANSFORM (_NEW_MODELVIEW|_NEW_TRANSFORM| \
+ _TNL_NEW_NEED_NORMALS)
+
+#define _TNL_NEW_SPACES (_TNL_NEW_NEED_NORMALS | \
+ _TNL_NEW_NEED_EYE_COORDS )
+
+#define NEED_NORMALS_TEXGEN 0x1
+#define NEED_NORMALS_LIGHT 0x2
+
+#define NEED_EYE_TEXGEN 0x1
+#define NEED_EYE_LIGHT 0x2
+#define NEED_EYE_LIGHT_MODELVIEW 0x4
+#define NEED_EYE_POINT_ATTEN 0x8
+
+
+
+#define DD_ANY_CULL (DD_TRI_CULL_FRONT_BACK| \
+ DD_TRI_CULL| \
+ DD_LIGHTING_CULL)
+
+
+
+
+
+
+/*
+ * Forward declaration of display list datatypes:
+ */
+union node;
+typedef union node Node;
+
+
+
+
+
+/* This has to be included here. */
+#include "dd.h"
+
+
+/*
+ * The library context:
+ */
+struct __GLcontextRec {
+ /*
+ ** Os related interfaces; these *must* be the first members of this
+ ** structure, because they are exposed to the outside world (i.e. GLX
+ ** extension).
+ */
+ __GLimports imports;
+ __GLexports exports;
+
+ /* State possibly shared with other contexts in the address space */
+ struct gl_shared_state *Shared;
+
+ /* API function pointer tables */
+ struct _glapi_table *Save; /* Display list save funcs */
+ struct _glapi_table *Exec; /* Execute funcs */
+ struct _glapi_table *CurrentDispatch; /* == Save or Exec !! */
+
+ GLvisual Visual;
+ GLframebuffer *DrawBuffer; /* buffer for writing */
+ GLframebuffer *ReadBuffer; /* buffer for reading */
+
+ /* Driver function pointer table */
+ struct dd_function_table Driver;
+
+ void *DriverCtx; /* Points to device driver context/state */
+ void *DriverMgrCtx; /* Points to device driver manager (optional)*/
+
+ /* Core/Driver constants */
+ struct gl_constants Const;
+
+ /* Modelview matrix and stack */
+ GLmatrix ModelView; /* current matrix, not stored on stack */
+ GLuint ModelViewStackDepth;
+ GLmatrix ModelViewStack[MAX_MODELVIEW_STACK_DEPTH - 1];
+
+ /* Projection matrix and stack */
+ GLmatrix ProjectionMatrix; /* current matrix, not stored on stack */
+ GLuint ProjectionStackDepth;
+ GLmatrix ProjectionStack[MAX_PROJECTION_STACK_DEPTH - 1];
+
+ /* Combined modelview and projection matrix */
+ GLmatrix _ModelProjectMatrix;
+
+ /* Texture matrix and stack */
+ GLmatrix TextureMatrix[MAX_TEXTURE_UNITS];
+ GLuint TextureStackDepth[MAX_TEXTURE_UNITS];
+ GLmatrix TextureStack[MAX_TEXTURE_UNITS][MAX_TEXTURE_STACK_DEPTH - 1];
+
+ /* Color matrix and stack */
+ GLmatrix ColorMatrix;
+ GLuint ColorStackDepth;
+ GLmatrix ColorStack[MAX_COLOR_STACK_DEPTH - 1];
+
+ /* Display lists */
+ GLuint CallDepth; /* Current recursion calling depth */
+ GLboolean ExecuteFlag; /* Execute GL commands? */
+ GLboolean CompileFlag; /* Compile GL commands into display list? */
+ Node *CurrentListPtr; /* Head of list being compiled */
+ GLuint CurrentListNum; /* Number of the list being compiled */
+ Node *CurrentBlock; /* Pointer to current block of nodes */
+ GLuint CurrentPos; /* Index into current block of nodes */
+
+ /* Extensions */
+ struct gl_extensions Extensions;
+
+ /* Renderer attribute stack */
+ GLuint AttribStackDepth;
+ struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH];
+
+ /* Renderer attribute groups */
+ struct gl_accum_attrib Accum;
+ struct gl_colorbuffer_attrib Color;
+ struct gl_current_attrib Current;
+ struct gl_depthbuffer_attrib Depth;
+ struct gl_eval_attrib Eval;
+ struct gl_fog_attrib Fog;
+ struct gl_hint_attrib Hint;
+ struct gl_light_attrib Light;
+ struct gl_line_attrib Line;
+ struct gl_list_attrib List;
+ struct gl_pixel_attrib Pixel;
+ struct gl_point_attrib Point;
+ struct gl_polygon_attrib Polygon;
+ GLuint PolygonStipple[32];
+ struct gl_scissor_attrib Scissor;
+ struct gl_stencil_attrib Stencil;
+ struct gl_texture_attrib Texture;
+ struct gl_transform_attrib Transform;
+ struct gl_viewport_attrib Viewport;
+
+ /* Other attribute groups */
+ struct gl_histogram_attrib Histogram;
+ struct gl_minmax_attrib MinMax;
+ struct gl_convolution_attrib Convolution1D;
+ struct gl_convolution_attrib Convolution2D;
+ struct gl_convolution_attrib Separable2D;
+
+ /* Client attribute stack */
+ GLuint ClientAttribStackDepth;
+ struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH];
+
+ /* Client attribute groups */
+ struct gl_array_attrib Array; /* Vertex arrays */
+ struct gl_pixelstore_attrib Pack; /* Pixel packing */
+ struct gl_pixelstore_attrib Unpack; /* Pixel unpacking */
+
+ struct gl_evaluators EvalMap; /* All evaluators */
+ struct gl_feedback Feedback; /* Feedback */
+ struct gl_selection Select; /* Selection */
+
+ struct gl_color_table ColorTable; /* Pre-convolution */
+ struct gl_color_table ProxyColorTable; /* Pre-convolution */
+ struct gl_color_table PostConvolutionColorTable;
+ struct gl_color_table ProxyPostConvolutionColorTable;
+ struct gl_color_table PostColorMatrixColorTable;
+ struct gl_color_table ProxyPostColorMatrixColorTable;
+
+ struct gl_fallback_arrays Fallback;
+
+ GLenum ErrorValue; /* Last error code */
+ GLenum RenderMode; /* either GL_RENDER, GL_SELECT, GL_FEEDBACK */
+ GLuint NewState; /* bitwise-or of _NEW_* flags */
+
+ /* Derived */
+ GLuint _Enabled; /* bitwise-or of ENABLE_* flags */
+ GLuint _TriangleCaps; /* bitwise-or of DD_* flags */
+ GLuint _ImageTransferState;/* bitwise-or of IMAGE_*_BIT flags */
+ GLfloat _EyeZDir[3];
+ GLfloat _ModelViewInvScale;
+ GLuint _NeedEyeCoords;
+ GLuint _NeedNormals; /* Are vertex normal vectors needed? */
+
+ struct gl_shine_tab *_ShineTable[4]; /* Active shine tables */
+ struct gl_shine_tab *_ShineTabList; /* Mru list of inactive shine tables */
+
+ struct gl_list_extensions listext; /* driver dlist extensions */
+
+
+ GLboolean OcclusionResult; /* GL_HP_occlusion_test */
+ GLboolean OcclusionResultSaved; /* GL_HP_occlusion_test */
+
+ /* Should 3Dfx Glide driver catch signals? */
+ GLboolean CatchSignals;
+
+ /* For debugging/development only */
+ GLboolean NoRaster;
+ GLboolean FirstTimeCurrent;
+
+ /* Dither disable via MESA_NO_DITHER env var */
+ GLboolean NoDither;
+
+#ifdef DEBUG
+ GLboolean Rendering;
+#endif
+
+#if defined(MESA_TRACE)
+ struct _glapi_table *TraceDispatch;
+ trace_context_t *TraceCtx;
+#endif
+
+ /* Hooks for module contexts. These will eventually live
+ * in the driver or elsewhere.
+ */
+ void *swrast_context;
+ void *swsetup_context;
+ void *swtnl_context;
+ void *swtnl_vb;
+ void *swtnl_im;
+};
+
+
+/* The string names for GL_POINT, GL_LINE_LOOP, etc */
+extern const char *_mesa_prim_name[GL_POLYGON+2];
+extern GLenum gl_reduce_prim[];
+
+
+#ifdef MESA_DEBUG
+extern int MESA_VERBOSE;
+extern int MESA_DEBUG_FLAGS;
+#else
+# define MESA_VERBOSE 0
+# define MESA_DEBUG_FLAGS 0
+# ifndef NDEBUG
+# define NDEBUG
+# endif
+#endif
+
+
+enum _verbose {
+ VERBOSE_VARRAY = 0x1,
+ VERBOSE_TEXTURE = 0x2,
+ VERBOSE_IMMEDIATE = 0x4,
+ VERBOSE_PIPELINE = 0x8,
+ VERBOSE_DRIVER = 0x10,
+ VERBOSE_STATE = 0x20,
+ VERBOSE_API = 0x40,
+ VERBOSE_TRIANGLE_CHECKS = 0x80,
+ VERBOSE_CULL = 0x100,
+ VERBOSE_DISPLAY_LIST = 0x200,
+ VERBOSE_LIGHTING = 0x400
+};
+
+
+enum _debug {
+ DEBUG_ALWAYS_FLUSH = 0x1
+};
+
+
+
+#define Elements(x) sizeof(x)/sizeof(*(x))
+
+
+#define FLUSH_TNL( ctx, flags ) \
+do { \
+ if (ctx->Driver.NeedFlush & flags) \
+ ctx->Driver.FlushVertices( ctx, flags ); \
+} while (0)
+
+#define FLUSH_TNL_RETURN( ctx, flags, where ) \
+do { \
+ if (ctx->Driver.NeedFlush & flags) { \
+ if (!ctx->Driver.FlushVertices( ctx, flags )) { \
+ gl_error( ctx, GL_INVALID_OPERATION, where ); \
+ return; \
+ } \
+ } \
+} while (0)
+
+#define FLUSH_TNL_RETVAL( ctx, flags, where, what ) \
+do { \
+ if (ctx->Driver.NeedFlush & flags) { \
+ if (!ctx->Driver.FlushVertices( ctx, flags )) { \
+ gl_error( ctx, GL_INVALID_OPERATION, where ); \
+ return what; \
+ } \
+ } \
+} while (0)
+
+
+#define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL( ctx, where, what ) \
+ FLUSH_TNL_RETVAL( ctx, \
+ (FLUSH_INSIDE_BEGIN_END| \
+ FLUSH_STORED_VERTICES), \
+ where, what )
+
+#define ASSERT_OUTSIDE_BEGIN_END( ctx, where ) \
+ FLUSH_TNL_RETURN( ctx, \
+ (FLUSH_INSIDE_BEGIN_END| \
+ FLUSH_STORED_VERTICES), \
+ where )
+
+#define ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, where ) \
+ ASSERT_OUTSIDE_BEGIN_END( ctx, where );
+
+#define ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL( ctx, where, what ) \
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL( ctx, where, what );
+
+
+#ifdef DEBUG
+
+#define RENDER_START(CTX) \
+ do { \
+ assert(!(CTX)->Rendering); \
+ (CTX)->Rendering = GL_TRUE; \
+ if ((CTX)->Driver.RenderStart) { \
+ (*(CTX)->Driver.RenderStart)(CTX); \
+ } \
+ } while (0)
+
+#define RENDER_FINISH(CTX) \
+ do { \
+ assert((CTX)->Rendering); \
+ (CTX)->Rendering = GL_FALSE; \
+ if ((CTX)->Driver.RenderFinish) { \
+ (*(CTX)->Driver.RenderFinish)(CTX); \
+ } \
+ } while (0)
+
+#else
+
+#define RENDER_START(CTX) \
+ do { \
+ if ((CTX)->Driver.RenderStart) { \
+ (*(CTX)->Driver.RenderStart)(CTX); \
+ } \
+ } while (0)
+
+#define RENDER_FINISH(CTX) \
+ do { \
+ if ((CTX)->Driver.RenderFinish) { \
+ (*(CTX)->Driver.RenderFinish)(CTX); \
+ } \
+ } while (0)
+
+#endif
+
+
+#endif /* TYPES_H */
-/* $Id: pixel.c,v 1.18 2000/10/30 16:32:43 brianp Exp $ */
+/* $Id: pixel.c,v 1.19 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "macros.h"
#include "mem.h"
#include "pixel.h"
-#include "types.h"
+#include "mtypes.h"
#endif
-/* $Id: pixel.h,v 1.6 2000/10/29 18:12:15 brianp Exp $ */
+/* $Id: pixel.h,v 1.7 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define PIXEL_H
-#include "types.h"
+#include "mtypes.h"
/*
-/* $Id: points.c,v 1.23 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: points.c,v 1.24 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.4
- *
+ *
* Copyright (C) 1999-2000 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
#include "mmath.h"
#include "points.h"
#include "texstate.h"
-#include "types.h"
+#include "mtypes.h"
#endif
-/* $Id: points.h,v 1.3 2000/10/31 18:09:44 keithw Exp $ */
+/* $Id: points.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define POINTS_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: polygon.c,v 1.15 2000/11/05 18:40:58 keithw Exp $ */
+/* $Id: polygon.c,v 1.16 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "macros.h"
#include "mem.h"
#include "polygon.h"
-#include "types.h"
+#include "mtypes.h"
#endif
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonMode");
if (MESA_VERBOSE&VERBOSE_API)
- fprintf(stderr, "glPolygonMode %s %s\n",
+ fprintf(stderr, "glPolygonMode %s %s\n",
gl_lookup_enum_by_nr(face),
gl_lookup_enum_by_nr(mode));
_mesa_unpack_polygon_stipple(pattern, ctx->PolygonStipple, &ctx->Unpack);
ctx->NewState |= _NEW_POLYGONSTIPPLE;
-
+
if (ctx->Driver.PolygonStipple)
ctx->Driver.PolygonStipple( ctx, (const GLubyte *) ctx->PolygonStipple );
}
-/* $Id: polygon.h,v 1.2 1999/11/11 01:22:27 brianp Exp $ */
+/* $Id: polygon.h,v 1.3 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define POLYGON_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: rastpos.c,v 1.14 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: rastpos.c,v 1.15 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "rastpos.h"
#include "state.h"
#include "simple_list.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
/* This has been split off to allow the normal shade routines to
- * get a little closer to the vertex buffer, and to use the
+ * get a little closer to the vertex buffer, and to use the
* GLvector objects directly.
*/
static void gl_shade_rastpos( GLcontext *ctx,
foreach (light, &ctx->Light.EnabledList) {
GLfloat n_dot_h;
GLfloat attenuation = 1.0;
- GLfloat VP[3];
+ GLfloat VP[3];
GLfloat n_dot_VP;
GLfloat *h;
GLfloat contrib[3];
attenuation = light->_VP_inf_spot_attenuation;
}
else {
- GLfloat d;
-
+ 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);
}
- attenuation = 1.0F / (light->ConstantAttenuation + d *
- (light->LinearAttenuation + d *
+ attenuation = 1.0F / (light->ConstantAttenuation + d *
+ (light->LinearAttenuation + d *
light->QuadraticAttenuation));
-
- if (light->_Flags & LIGHT_SPOT)
+
+ if (light->_Flags & LIGHT_SPOT)
{
GLfloat PV_dot_dir = - DOT3(VP, light->_NormDirection);
-
+
if (PV_dot_dir<light->_CosCutoff) {
- continue;
+ continue;
}
- else
+ else
{
double x = PV_dot_dir * (EXP_TABLE_SIZE-1);
int k = (int) x;
}
}
- if (attenuation < 1e-3)
+ if (attenuation < 1e-3)
continue;
n_dot_VP = DOT3( normal, VP );
if (n_dot_VP < 0.0F) {
ACC_SCALE_SCALAR_3V(color, attenuation, light->_MatAmbient[0]);
continue;
- }
+ }
COPY_3V(contrib, light->_MatAmbient[0]);
ACC_SCALE_SCALAR_3V(contrib, n_dot_VP, light->_MatDiffuse[0]);
h = light->_h_inf_norm;
normalized = 1;
}
-
+
n_dot_h = DOT3(normal, h);
if (n_dot_h > 0.0F) {
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) {
}
ACC_SCALE_SCALAR_3V( color, attenuation, contrib );
- }
+ }
if (ctx->Visual.RGBAflag) {
Rcolor[0] = CLAMP(color[0], 0.0F, 1.0F);
/* KW: Added this test, which is in the spec. We can't do this
* inside begin/end any more because the ctx->Current values
- * aren't uptodate during that period.
+ * aren't uptodate during that period.
*/
FLUSH_TNL_RETURN(ctx, (FLUSH_INSIDE_BEGIN_END|
FLUSH_STORED_VERTICES|
TRANSFORM_POINT( eye, ctx->ModelView.m, v );
/* raster color */
- if (ctx->Light.Enabled)
+ if (ctx->Light.Enabled)
{
GLfloat *norm, eyenorm[3];
GLfloat *objnorm = ctx->Current.Normal;
norm = objnorm;
}
- gl_shade_rastpos( ctx, v, norm,
+ gl_shade_rastpos( ctx, v, norm,
ctx->Current.RasterColor,
&ctx->Current.RasterIndex );
/* clip to user clipping planes */
if ( ctx->Transform._AnyClip &&
- gl_userclip_point(ctx, clip) == 0)
+ gl_userclip_point(ctx, clip) == 0)
{
ctx->Current.RasterPosValid = GL_FALSE;
return;
ndc[1] = clip[1] * d;
ndc[2] = clip[2] * d;
- ctx->Current.RasterPos[0] = (ndc[0] * ctx->Viewport._WindowMap.m[MAT_SX] +
+ ctx->Current.RasterPos[0] = (ndc[0] * ctx->Viewport._WindowMap.m[MAT_SX] +
ctx->Viewport._WindowMap.m[MAT_TX]);
- ctx->Current.RasterPos[1] = (ndc[1] * ctx->Viewport._WindowMap.m[MAT_SY] +
+ ctx->Current.RasterPos[1] = (ndc[1] * ctx->Viewport._WindowMap.m[MAT_SY] +
ctx->Viewport._WindowMap.m[MAT_TY]);
- ctx->Current.RasterPos[2] = (ndc[2] * ctx->Viewport._WindowMap.m[MAT_SZ] +
+ ctx->Current.RasterPos[2] = (ndc[2] * ctx->Viewport._WindowMap.m[MAT_SZ] +
ctx->Viewport._WindowMap.m[MAT_TZ]) / ctx->Visual.DepthMaxF;
ctx->Current.RasterPos[3] = clip[3];
ctx->Current.RasterPosValid = GL_TRUE;
-/* $Id: state.c,v 1.46 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: state.c,v 1.47 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
#include "texobj.h"
#include "texstate.h"
#include "texture.h"
-#include "types.h"
+#include "mtypes.h"
#include "varray.h"
#include "winpos.h"
ctx->_TriangleCaps |= DD_TRI_OFFSET;
}
-static void
+static void
calculate_model_project_matrix( GLcontext *ctx )
{
if (!ctx->_NeedEyeCoords) {
}
-/* Bring uptodate any state that relies on _NeedEyeCoords.
+/* Bring uptodate any state that relies on _NeedEyeCoords.
*/
static void
update_tnl_spaces( GLcontext *ctx, GLuint oldneedeyecoords )
-{
+{
/* Check if the truth-value interpretations of the bitfields have
- * changed:
+ * changed:
*/
if ((oldneedeyecoords == 0) != (ctx->_NeedEyeCoords == 0)) {
/* Recalculate all state that depends on _NeedEyeCoords.
/* Recalculate that same state if and only if it has been
* invalidated by other statechanges.
*/
- if (new_state & _NEW_MODELVIEW)
+ if (new_state & _NEW_MODELVIEW)
update_modelview_scale(ctx);
- if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION))
+ if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION))
calculate_model_project_matrix(ctx);
-
+
if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW))
gl_compute_light_positions( ctx );
}
update_projection( GLcontext *ctx )
{
_math_matrix_analyze( &ctx->ProjectionMatrix );
-
+
/* Recompute clip plane positions in clipspace. This is also done
* in _mesa_ClipPlane().
*/
if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset)
mask |= IMAGE_SHIFT_OFFSET_BIT;
-
+
if (ctx->Pixel.MapColorFlag)
mask |= IMAGE_MAP_COLOR_BIT;
* 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 gl_update_state( GLcontext *ctx )
{
if (MESA_VERBOSE & VERBOSE_STATE)
gl_print_state("", new_state);
- if (new_state & _NEW_MODELVIEW)
+ if (new_state & _NEW_MODELVIEW)
_math_matrix_analyze( &ctx->ModelView );
- if (new_state & _NEW_PROJECTION)
+ if (new_state & _NEW_PROJECTION)
update_projection( ctx );
- if (new_state & _NEW_TEXTURE_MATRIX)
+ if (new_state & _NEW_TEXTURE_MATRIX)
_mesa_update_texture_matrices( ctx );
- if (new_state & _NEW_COLOR_MATRIX)
+ if (new_state & _NEW_COLOR_MATRIX)
_math_matrix_analyze( &ctx->ColorMatrix );
-
+
/* References ColorMatrix.type (derived above).
*/
if (new_state & (_NEW_PIXEL|_NEW_COLOR_MATRIX))
/* Contributes to NeedEyeCoords, NeedNormals.
*/
- if (new_state & _NEW_TEXTURE)
+ if (new_state & _NEW_TEXTURE)
_mesa_update_texture_state( ctx );
- if (new_state & (_NEW_BUFFERS|_NEW_SCISSOR))
+ if (new_state & (_NEW_BUFFERS|_NEW_SCISSOR))
update_drawbuffer( ctx );
- if (new_state & _NEW_POLYGON)
+ if (new_state & _NEW_POLYGON)
update_polygon( ctx );
/* Contributes to NeedEyeCoords, NeedNormals.
*/
- if (new_state & _NEW_LIGHT)
+ if (new_state & _NEW_LIGHT)
gl_update_lighting( ctx );
/* We can light in object space if the modelview matrix preserves
* If the truth value of either has changed, update for the new
* lighting space and recompute the positions of lights and the
* 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 |
_TNL_NEW_NORMAL_TRANSFORM |
_NEW_LIGHT |
- _TNL_NEW_NEED_EYE_COORDS))
+ _TNL_NEW_NEED_EYE_COORDS))
update_tnl_spaces( ctx, oldneedeyecoords );
/*
-/* $Id: state.h,v 1.4 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: state.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#ifndef STATE_H
#define STATE_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: stencil.c,v 1.22 2000/10/31 18:09:45 keithw Exp $ */
+/* $Id: stencil.c,v 1.23 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "macros.h"
#include "mem.h"
#include "stencil.h"
-#include "types.h"
+#include "mtypes.h"
#include "enable.h"
#endif
-/* $Id: stencil.h,v 1.7 2000/10/31 18:09:45 keithw Exp $ */
+/* $Id: stencil.h,v 1.8 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define STENCIL_H
-#include "types.h"
+#include "mtypes.h"
extern void
-/* $Id: teximage.c,v 1.64 2000/11/21 23:25:40 brianp Exp $ */
+/* $Id: teximage.c,v 1.65 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "state.h"
#include "teximage.h"
#include "texstate.h"
-#include "types.h"
+#include "mtypes.h"
#include "swrast/s_span.h" /* XXX SWRAST hack */
#endif
}
return; /* all done */
}
- }
+ }
/*
* General case solutions
ASSERT(ctx->Pixel.Convolution1DEnabled);
_mesa_convolve_1d_image(ctx, &convWidth, tmpImage, convImage);
}
- else {
+ else {
if (ctx->Pixel.Convolution2DEnabled) {
_mesa_convolve_2d_image(ctx, &convWidth, &convHeight,
tmpImage, convImage);
if (ctx->NewState & _NEW_PIXEL)
gl_update_state(ctx);
- if (ctx->_ImageTransferState || !ctx->Driver.CopyTexImage1D
+ if (ctx->_ImageTransferState || !ctx->Driver.CopyTexImage1D
|| !(*ctx->Driver.CopyTexImage1D)(ctx, target, level,
internalFormat, x, y, width, border)) {
struct gl_pixelstore_attrib unpackSave;
gl_error( ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage2D" );
return;
}
-
+
/* now call glTexSubImage1D to do the real work */
unpackSave = ctx->Unpack;
ctx->Unpack = _mesa_native_packing;
_mesa_TexSubImage2D(target, level, xoffset, yoffset, width, height,
GL_RGBA, GL_UNSIGNED_BYTE, image);
ctx->Unpack = unpackSave;
-
+
FREE(image);
}
}
_mesa_TexSubImage3D(target, level, xoffset, yoffset, zoffset,
width, height, 1, GL_RGBA, GL_UNSIGNED_BYTE, image);
ctx->Unpack = unpackSave;
-
+
FREE(image);
}
}
-/* $Id: teximage.h,v 1.14 2000/10/16 23:43:12 brianp Exp $ */
+/* $Id: teximage.h,v 1.15 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define TEXIMAGE_H
-#include "types.h"
+#include "mtypes.h"
/*** Internal functions ***/
extern void
-_mesa_CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset,
+_mesa_CopyTexSubImage1D( GLenum target, GLint level, GLint xoffset,
GLint x, GLint y, GLsizei width );
GLint x, GLint y, GLsizei width, GLsizei height );
-extern void
+extern void
_mesa_CopyTexSubImage3D( GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y, GLsizei width, GLsizei height );
-/* $Id: texobj.c,v 1.34 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: texobj.c,v 1.35 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "teximage.h"
#include "texstate.h"
#include "texobj.h"
-#include "types.h"
+#include "mtypes.h"
#endif
ctx->NewState |= _NEW_TEXTURE;
/* Pass BindTexture call to device driver */
- if (ctx->Driver.BindTexture)
+ if (ctx->Driver.BindTexture)
(*ctx->Driver.BindTexture)( ctx, target, newTexObj );
if (oldTexObj->Name > 0) {
/*
- * Execute glAreTexturesResident
+ * Execute glAreTexturesResident
*/
GLboolean
_mesa_AreTexturesResident(GLsizei n, const GLuint *texName,
GLboolean allResident = GL_TRUE;
GLint i;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx,
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx,
"glAreTexturesResident", GL_FALSE);
if (n < 0) {
gl_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)");
-/* $Id: texobj.h,v 1.4 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: texobj.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define TEXTOBJ_H
-#include "types.h"
+#include "mtypes.h"
-/* $Id: texstate.c,v 1.23 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: texstate.c,v 1.24 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "teximage.h"
#include "texstate.h"
#include "texture.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_xform.h"
#include "math/m_matrix.h"
#include "swrast/swrast.h"
}
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
- fprintf(stderr, "glTexEnv %s %s %.1f(%s) ...\n",
+ fprintf(stderr, "glTexEnv %s %s %.1f(%s) ...\n",
gl_lookup_enum_by_nr(target),
gl_lookup_enum_by_nr(pname),
*param,
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glTexParameterfv");
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
- fprintf(stderr, "texPARAM %s %s %d...\n",
+ fprintf(stderr, "texPARAM %s %s %d...\n",
gl_lookup_enum_by_nr(target),
gl_lookup_enum_by_nr(pname),
eparam);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glTexGenfv");
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
- fprintf(stderr, "texGEN %s %s %x...\n",
+ fprintf(stderr, "texGEN %s %s %x...\n",
gl_lookup_enum_by_nr(coord),
gl_lookup_enum_by_nr(pname),
*(int *)params);
if (pname==GL_TEXTURE_GEN_MODE) {
GLenum mode = (GLenum) (GLint) *params;
switch (mode) {
- case GL_OBJECT_LINEAR:
+ case GL_OBJECT_LINEAR:
texUnit->GenModeQ = GL_OBJECT_LINEAR;
texUnit->_GenBitQ = TEXGEN_OBJ_LINEAR;
break;
ASSERT_OUTSIDE_BEGIN_END( ctx, "glActiveTextureARB" );
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
- fprintf(stderr, "glActiveTexture %s\n",
+ fprintf(stderr, "glActiveTexture %s\n",
gl_lookup_enum_by_nr(target));
if (target >= GL_TEXTURE0_ARB && target < GL_TEXTURE0_ARB + maxUnits) {
-/* $Id: texstate.h,v 1.4 2000/11/19 23:10:25 brianp Exp $ */
+/* $Id: texstate.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
- *
+ *
* Copyright (C) 1999 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
#define TEXSTATE_H
-#include "types.h"
+#include "mtypes.h"
/*** Called from API ***/
-/* $Id: texutil.c,v 1.9 2000/11/09 22:41:25 brianp Exp $ */
+/* $Id: texutil.c,v 1.10 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.4
- *
+ *
* Copyright (C) 1999-2000 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
#include "image.h"
#include "mem.h"
#include "texutil.h"
-#include "types.h"
+#include "mtypes.h"
#endif
dstYoffset *= hScale;
/* XXX hscale != 1 and wscale != 1 not tested!!!! */
-
+
switch (dstFormat) {
case MESA_I8:
case MESA_L8:
-/* $Id: texutil.h,v 1.5 2000/10/29 18:12:15 brianp Exp $ */
+/* $Id: texutil.h,v 1.6 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define TEXUTIL_H
-#include "types.h"
+#include "mtypes.h"
-/* $Id: varray.c,v 1.31 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: varray.c,v 1.32 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "mmath.h"
#include "state.h"
#include "texstate.h"
-#include "types.h"
+#include "mtypes.h"
#include "varray.h"
#include "math/m_translate.h"
#endif
_mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
-
+
if (size<2 || size>4) {
gl_error( ctx, GL_INVALID_VALUE, "glVertexPointer(size)" );
return;
gl_error( ctx, GL_INVALID_VALUE, "glVertexPointer(stride)" );
return;
}
-
+
if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- fprintf(stderr, "glVertexPointer( sz %d type %s stride %d )\n", size,
+ fprintf(stderr, "glVertexPointer( sz %d type %s stride %d )\n", size,
gl_lookup_enum_by_nr( type ),
stride);
_mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
{
GET_CURRENT_CONTEXT(ctx);
-
+
if (stride<0) {
gl_error( ctx, GL_INVALID_VALUE, "glNormalPointer(stride)" );
return;
}
if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- fprintf(stderr, "glNormalPointer( type %s stride %d )\n",
+ fprintf(stderr, "glNormalPointer( type %s stride %d )\n",
gl_lookup_enum_by_nr( type ),
stride);
}
if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- fprintf(stderr, "glColorPointer( sz %d type %s stride %d )\n", size,
+ fprintf(stderr, "glColorPointer( sz %d type %s stride %d )\n", size,
gl_lookup_enum_by_nr( type ),
stride);
_mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
-
+
if (stride<0) {
gl_error( ctx, GL_INVALID_VALUE, "glFogCoordPointer(stride)" );
return;
_mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
-
+
if (stride<0) {
gl_error( ctx, GL_INVALID_VALUE, "glIndexPointer(stride)" );
return;
void
-_mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
+_mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
GLsizei stride, const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
}
if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- fprintf(stderr, "glColorPointer( sz %d type %s stride %d )\n", size,
+ fprintf(stderr, "glColorPointer( sz %d type %s stride %d )\n", size,
gl_lookup_enum_by_nr( type ),
stride);
{
GET_CURRENT_CONTEXT(ctx);
GLuint texUnit;
-
+
texUnit = ctx->Array.ActiveTexture;
if (size<1 || size>4) {
}
if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- fprintf(stderr, "glTexCoordPointer( unit %u sz %d type %s stride %d )\n",
+ fprintf(stderr, "glTexCoordPointer( unit %u sz %d type %s stride %d )\n",
texUnit,
- size,
+ size,
gl_lookup_enum_by_nr( type ),
stride);
GLint defstride; /* default stride */
GLint c, f;
GLint coordUnitSave;
-
+
f = sizeof(GLfloat);
c = f * ((4*sizeof(GLubyte) + (f-1)) / f);
-/* $Id: varray.h,v 1.9 2000/11/16 21:05:35 keithw Exp $ */
+/* $Id: varray.h,v 1.10 2000/11/22 07:32:17 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define VARRAY_H
-#include "types.h"
+#include "mtypes.h"
extern void
_mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr);
extern void
-_mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
+_mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
GLsizei stride, const GLvoid *ptr);
-/* $Id: s_aaline.c,v 1.2 2000/11/13 20:02:57 keithw Exp $ */
+/* $Id: s_aaline.c,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "swrast/s_pb.h"
#include "swrast/s_context.h"
#include "swrast/swrast.h"
-#include "types.h"
+#include "mtypes.h"
-/* $Id: s_aaline.h,v 1.1 2000/11/05 23:15:16 brianp Exp $ */
+/* $Id: s_aaline.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_AALINE_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_aatriangle.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_aatriangle.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define S_AATRIANGLE_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_accum.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_accum.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
- *
+ *
* Copyright (C) 1999 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
#define S_ACCUM_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_alpha.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_alpha.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define S_ALPHA_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_alphabuf.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_alphabuf.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_ALPHABUF_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_blend.h,v 1.2 2000/11/05 18:24:40 keithw Exp $ */
+/* $Id: s_blend.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_BLEND_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_context.c,v 1.5 2000/11/19 23:10:26 brianp Exp $ */
+/* $Id: s_context.c,v 1.6 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
*/
#include "glheader.h"
-#include "types.h"
+#include "mtypes.h"
#include "mem.h"
#include "s_pb.h"
* Recompute the value of swrast->_RasterMask, etc. according to
* the current context.
*/
-static void
+static void
_swrast_update_rasterflags( GLcontext *ctx )
{
GLuint RasterMask = 0;
static void
_swrast_update_hint( GLcontext *ctx )
{
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
swrast->_PreferPixelFog = (!swrast->AllowVertexFog ||
- (ctx->Hint.Fog == GL_NICEST &&
+ (ctx->Hint.Fog == GL_NICEST &&
swrast->AllowPixelFog));
}
-/* Stub for swrast->Triangle to select a true triangle function
+/* Stub for swrast->Triangle to select a true triangle function
* after a state change.
*/
static void
-_swrast_validate_quad( GLcontext *ctx,
+_swrast_validate_quad( GLcontext *ctx,
const SWvertex *v0, const SWvertex *v1,
const SWvertex *v2, const SWvertex *v3 )
{
}
static void
-_swrast_validate_triangle( GLcontext *ctx,
+_swrast_validate_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 )
swrast->Point( ctx, v0 );
}
-static void
+static void
_swrast_validate_blend_func( GLcontext *ctx, GLuint n,
const GLubyte mask[],
- GLchan src[][4],
+ GLchan src[][4],
CONST GLchan dst[][4] )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
}
-static void
+static void
_swrast_validate_texture_sample( GLcontext *ctx, GLuint texUnit,
const struct gl_texture_object *tObj,
GLuint n,
_swrast_validate_derived( ctx );
_swrast_choose_texture_sample_func( ctx, texUnit, tObj );
- swrast->TextureSample[texUnit]( ctx, texUnit, tObj, n, s, t, u,
+ swrast->TextureSample[texUnit]( ctx, texUnit, tObj, n, s, t, u,
lambda, rgba );
}
swrast->NewState |= new_state;
/* After 10 statechanges without any swrast functions being called,
- * put the module to sleep.
+ * put the module to sleep.
*/
if (++swrast->StateChanges > 10) {
swrast->InvalidateState = _swrast_sleep;
swrast->NewState = ~0;
new_state = ~0;
}
-
+
if (new_state & swrast->invalidate_triangle)
swrast->Triangle = _swrast_validate_triangle;
if (new_state & _SWRAST_NEW_BLEND_FUNC)
swrast->BlendFunc = _swrast_validate_blend_func;
-
- if (new_state & _SWRAST_NEW_TEXTURE_SAMPLE_FUNC)
+
+ if (new_state & _SWRAST_NEW_TEXTURE_SAMPLE_FUNC)
for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++)
swrast->TextureSample[i] = _swrast_validate_texture_sample;
}
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- if (swrast->NewState)
+ if (swrast->NewState)
{
- if (swrast->NewState & _SWRAST_NEW_RASTERMASK)
+ if (swrast->NewState & _SWRAST_NEW_RASTERMASK)
_swrast_update_rasterflags( ctx );
if (swrast->NewState & _NEW_TEXTURE)
- swrast->_MultiTextureEnabled = (ctx->Texture._ReallyEnabled &
+ swrast->_MultiTextureEnabled = (ctx->Texture._ReallyEnabled &
~ENABLE_TEX0);
if (swrast->NewState & _NEW_POLYGON)
/* Public entrypoints: See also s_accum.c, s_bitmap.c, etc.
*/
void
-_swrast_Quad( GLcontext *ctx,
+_swrast_Quad( GLcontext *ctx,
const SWvertex *v0, const SWvertex *v1,
const SWvertex *v2, const SWvertex *v3 )
{
return &SWRAST_CONTEXT(ctx)->StippleCounter;
}
-void
+void
_swrast_allow_vertex_fog( GLcontext *ctx, GLboolean value )
{
SWRAST_CONTEXT(ctx)->InvalidateState( ctx, _NEW_HINT );
SWRAST_CONTEXT(ctx)->AllowVertexFog = value;
}
-void
+void
_swrast_allow_pixel_fog( GLcontext *ctx, GLboolean value )
{
SWRAST_CONTEXT(ctx)->InvalidateState( ctx, _NEW_HINT );
}
swrast->NewState = ~0;
-
+
swrast->choose_point = _swrast_choose_point;
swrast->choose_line = _swrast_choose_line;
swrast->choose_triangle = _swrast_choose_triangle;
for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++)
swrast->TextureSample[i] = _swrast_validate_texture_sample;
-
+
ctx->swrast_context = swrast;
return GL_TRUE;
}
FREE( swrast->PB );
FREE( swrast );
-
+
ctx->swrast_context = 0;
}
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#ifndef S_CONTEXT_H
#define S_CONTEXT_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
/*
typedef struct
{
/* Configuration mechanisms to make software rasterizer match
- * characteristics of the hardware rasterizer (if present):
+ * characteristics of the hardware rasterizer (if present):
*/
GLboolean AllowVertexFog;
GLboolean AllowPixelFog;
GLfloat _backface_sign;
GLboolean _PreferPixelFog;
- /* Accum buffer temporaries.
+ /* Accum buffer temporaries.
*/
GLboolean _IntegerAccumMode; /* Storing unscaled integers? */
GLfloat _IntegerAccumScaler; /* Implicit scale factor */
-
+
/* Working values:
*/
struct pixel_buffer* PB;
GLuint StippleCounter; /* Line stipple counter */
GLuint NewState;
GLuint StateChanges;
-
+
/* Mechanism to allow driver (like X11) to register further
* software rasterization routines.
*/
-/* $Id: s_depth.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_depth.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define S_DEPTH_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_drawpix.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_drawpix.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define S_DRAWPIXELS_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_feedback.h,v 1.2 2000/11/19 23:10:26 brianp Exp $ */
+/* $Id: s_feedback.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999 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
#define S_FEEDBACK_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_fog.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_fog.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_FOG_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
extern void
_mesa_win_fog_coords_from_z( const GLcontext *ctx,
- GLuint n,
- const GLdepth z[],
+ GLuint n,
+ const GLdepth z[],
GLfixed fogcoord[] );
extern void
-/* $Id: s_lines.h,v 1.2 2000/11/19 23:10:26 brianp Exp $ */
+/* $Id: s_lines.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#ifndef S_LINES_H
#define S_LINES_H
-#include "types.h"
+#include "mtypes.h"
-void
+void
_swrast_choose_line( GLcontext *ctx );
-/* $Id: s_logic.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_logic.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_LOGIC_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-extern void
+extern void
_mesa_logicop_ci_span( GLcontext *ctx,
GLuint n, GLint x, GLint y, GLuint index[],
const GLubyte mask[] );
-/* $Id: s_masking.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_masking.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_MASKING_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_pixeltex.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_pixeltex.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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 noti_mesa_PixelTexGenParameterfvce 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
#ifndef S_PIXELTEX_H
#define S_PIXELTEX_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
extern void
-/* $Id: s_points.h,v 1.2 2000/11/19 23:10:26 brianp Exp $ */
+/* $Id: s_points.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#ifndef S_POINTS_H
#define S_POINTS_H
-#include "types.h"
+#include "mtypes.h"
-void
+void
_swrast_choose_point( GLcontext *ctx );
-/* $Id: s_span.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_span.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_SPAN_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_stencil.h,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_stencil.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.3
- *
+ *
* Copyright (C) 1999-2000 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
#define S_STENCIL_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_texture.h,v 1.2 2000/11/05 18:24:41 keithw Exp $ */
+/* $Id: s_texture.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_TEXTURE_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-/* $Id: s_triangle.h,v 1.3 2000/11/19 23:10:26 brianp Exp $ */
+/* $Id: s_triangle.h,v 1.4 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.1
- *
+ *
* Copyright (C) 1999 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
#define S_TRIANGLES_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
-GLboolean gl_cull_triangle( GLcontext *ctx,
+GLboolean gl_cull_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2);
-void
+void
_swrast_choose_triangle( GLcontext *ctx );
-/* $Id: s_zoom.h,v 1.1 2000/10/31 18:00:05 keithw Exp $ */
+/* $Id: s_zoom.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#define S_ZOOM_H
-#include "types.h"
+#include "mtypes.h"
extern void
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#ifndef SWRAST_H
#define SWRAST_H
-#include "types.h"
+#include "mtypes.h"
* drivers.
*
* Full software drivers:
- * - Register the rastersetup and triangle functions from
+ * - Register the rastersetup and triangle functions from
* utils/software_helper.
* - On statechange, update the rasterization pointers in that module.
- *
+ *
* Rasterization hardware drivers:
* - Keep native rastersetup.
* - Implement native twoside,offset and unfilled triangle setup.
* prims), call a pass-through function which translates native
* vertices to SWvertices and calls the appropriate swrast function.
* - On total fallback (vertex format insufficient for state or all
- * primitives unaccelerated), hook in swrast_setup instead.
+ * primitives unaccelerated), hook in swrast_setup instead.
*/
typedef struct {
GLfloat win[4];
-/* These are the public-access functions exported from swrast.
+/* These are the public-access functions exported from swrast.
*/
extern void
_swrast_alloc_buffers( GLcontext *ctx );
-extern void
-_swrast_Bitmap( GLcontext *ctx,
+extern void
+_swrast_Bitmap( GLcontext *ctx,
GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
const GLubyte *bitmap );
extern void
-_swrast_CopyPixels( GLcontext *ctx,
- GLint srcx, GLint srcy,
- GLint destx, GLint desty,
+_swrast_CopyPixels( GLcontext *ctx,
+ GLint srcx, GLint srcy,
+ GLint destx, GLint desty,
GLsizei width, GLsizei height,
GLenum type );
extern void
-_swrast_DrawPixels( GLcontext *ctx,
+_swrast_DrawPixels( GLcontext *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
- GLenum format, GLenum type,
+ GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels );
const struct gl_pixelstore_attrib *unpack,
GLvoid *pixels );
-extern void
+extern void
_swrast_Clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
GLint x, GLint y, GLint width, GLint height );
extern void
-_swrast_Accum( GLcontext *ctx, GLenum op,
- GLfloat value, GLint xpos, GLint ypos,
+_swrast_Accum( GLcontext *ctx, GLenum op,
+ GLfloat value, GLint xpos, GLint ypos,
GLint width, GLint height );
const SWvertex *v0, const SWvertex *v1,
const SWvertex *v2, const SWvertex *v3);
-extern void
+extern void
_swrast_flush( GLcontext *ctx );
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#ifndef SS_CONTEXT_H
#define SS_CONTEXT_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast/swrast.h"
#include "swrast_setup.h"
void (*RasterSetup)( struct vertex_buffer *VB, GLuint start, GLuint end );
- void (*Quad)( GLcontext *ctx, GLuint v0, GLuint v1,
+ void (*Quad)( GLcontext *ctx, GLuint v0, GLuint v1,
GLuint v2, GLuint v3, GLuint pv );
- void (*Triangle)( GLcontext *ctx, GLuint v0, GLuint v1,
+ void (*Triangle)( GLcontext *ctx, GLuint v0, GLuint v1,
GLuint v2, GLuint pv );
void (*Line)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint pv );
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#include "glheader.h"
#include "macros.h"
-#include "types.h"
+#include "mtypes.h"
#include "tnl/t_context.h"
if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
ind |= SS_TWOSIDE_BIT;
-
- if (ctx->Polygon._Unfilled)
+
+ if (ctx->Polygon._Unfilled)
ind |= SS_UNFILLED_BIT;
if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) ||
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#ifndef SS_TRIANGLE_H
#define SS_TRIANGLE_H
-#include "types.h"
+#include "mtypes.h"
#include "ss_context.h"
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#ifndef SS_VB_H
#define SS_VB_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast_setup.h"
void _swsetup_vb_init( GLcontext *ctx );
-#include "types.h"
+#include "mtypes.h"
#include "mem.h"
#include "t_context.h"
#endif
-GLboolean
+GLboolean
_tnl_flush_vertices( GLcontext *ctx, GLuint flush_flags )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct immediate *IM = TNL_CURRENT_IM(ctx);
if ((IM->Flag[IM->Count] & (VERT_BEGIN|VERT_END)) != VERT_END ||
- (flush_flags & (FLUSH_STORED_VERTICES|FLUSH_UPDATE_CURRENT)))
+ (flush_flags & (FLUSH_STORED_VERTICES|FLUSH_UPDATE_CURRENT)))
{
- if (IM->Flag[IM->Start])
+ if (IM->Flag[IM->Start])
_mesa_flush_vb( ctx );
-
+
/* Although this code updates the ctx->Current values, that bit
* is left set as there is no easy mechanism to set it
* elsewhere. This means that each time core wants to examine
static int firsttime = 1;
/* Onetime initializations. Doesn't really matter if this gets
- * done twice: no need for mutexes.
+ * done twice: no need for mutexes.
*/
if (firsttime) {
firsttime = 0;
ctx->swtnl_im = (void *)TNL_VB(ctx)->IM;
-
+
/* Initialize tnl state.
*/
_tnl_dlist_init( ctx );
/* Set a few default values in the driver struct. This is a
- * temporary mechanism.
+ * temporary mechanism.
*/
ctx->Driver.RenderVBCulledTab = _tnl_render_tab_cull;
ctx->Driver.RenderVBClippedTab = _tnl_render_tab_clipped;
}
-/* Update all state that references _NeedEyeCoords
+/* Update all state that references _NeedEyeCoords
*/
void
_tnl_LightingSpaceChange( GLcontext *ctx )
{
- _tnl_update_normal_transform( ctx );
+ _tnl_update_normal_transform( ctx );
}
-void
+void
_tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
{
if (new_state & _NEW_LIGHT)
if (new_state & _NEW_TEXTURE)
if (ctx->_Enabled & ENABLE_TEXGEN_ANY)
_tnl_update_texgen( ctx );
-
+
if (new_state & (_NEW_LIGHT|_NEW_TEXTURE|_NEW_FOG|
_DD_NEW_TRI_LIGHT_TWOSIDE |
_DD_NEW_SEPERATE_SPECULAR |
}
void
-_tnl_MakeCurrent( GLcontext *ctx,
- GLframebuffer *drawBuffer,
+_tnl_MakeCurrent( GLcontext *ctx,
+ GLframebuffer *drawBuffer,
GLframebuffer *readBuffer )
{
#ifndef THREADS
-/* $Id: t_context.h,v 1.2 2000/11/20 13:39:36 keithw Exp $ */
+/* $Id: t_context.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#define _T_CONTEXT_H
#include "glheader.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_matrix.h"
#include "math/m_vector.h"
/* KW: Flags that describe the current vertex state, and the contents
- * of a vertex in a vertex-cassette.
+ * of a vertex in a vertex-cassette.
*
* For really major expansion, consider a 'VERT_ADDITIONAL_FLAGS' flag,
* which means there is data in another flags array (eg, extra_flags[]).
#define VERT_EDGE 0x200 /* glEdgeFlag */
#define VERT_MATERIAL 0x400 /* glMaterial */
#define VERT_END_VB 0x800 /* end vb marker */
-#define VERT_TEX0_12 0x1000
+#define VERT_TEX0_12 0x1000
#define VERT_TEX0_3 0x2000
#define VERT_TEX0_4 0x4000
#define VERT_TEX1_12 0x8000
GLvector1ui Index;
GLvector1ub EdgeFlag;
GLvector4f TexCoord[MAX_TEXTURE_UNITS];
- GLvector1ui Elt;
+ GLvector1ui Elt;
GLvector4ub SecondaryColor;
GLvector1f FogCoord;
};
GLvector1ui *Index;
GLvector1ub *EdgeFlag;
GLvector4f *TexCoord[MAX_TEXTURE_UNITS];
- GLvector1ui *Elt;
+ GLvector1ui *Elt;
GLvector4ub *SecondaryColor;
- GLvector1f *FogCoord;
+ GLvector1f *FogCoord;
};
/* Values for VB->Type */
/* KW: Represents everything that can take place between a begin and
* end, and can represent multiple begin/end pairs. This plus *any*
* state variable (GLcontext) should be all you need to replay the
- * represented begin/end pairs as if they took place in that state.
+ * represented begin/end pairs as if they took place in that state.
*
* Thus this is sufficient for both immediate and compiled modes, but
* we could/should throw some elements away for compiled mode if we
- * know they were empty.
+ * know they were empty.
*/
-struct immediate
-{
+struct immediate
+{
struct immediate *next; /* for cache of free IM's */
GLuint id, ref_count;
GLuint TF4[MAX_TEXTURE_UNITS];
GLuint Primitive[VB_SIZE]; /* GLubyte would do... */
- GLuint NextPrimitive[VB_SIZE];
+ GLuint NextPrimitive[VB_SIZE];
/* allocate storage for these on demand:
*/
- struct gl_material (*Material)[2];
- GLuint *MaterialMask;
+ struct gl_material (*Material)[2];
+ GLuint *MaterialMask;
- GLfloat (*TexCoordPtr[MAX_TEXTURE_UNITS])[4];
+ GLfloat (*TexCoordPtr[MAX_TEXTURE_UNITS])[4];
struct vertex_arrays v;
-
- struct __GLcontextRec *backref;
+
+ struct __GLcontextRec *backref;
/* Normal lengths, zero if not available.
*/
/* Temporary storage used by immediate mode functions and various
* operations in the pipeline.
*/
- struct immediate *IM;
+ struct immediate *IM;
struct vertex_array_pointers store;
/* Where to find outstanding untransformed vertices.
GLvector1f *FogCoordPtr;
GLuint *Flag, FlagMax;
struct gl_material (*Material)[2];
- GLuint *MaterialMask;
+ GLuint *MaterialMask;
- GLuint *NextPrimitive;
- GLuint *Primitive;
+ GLuint *NextPrimitive;
+ GLuint *Primitive;
GLuint LastPrimitive;
GLfloat (*BoundsPtr)[3]; /* Bounds for cull check */
GLfloat *NormalLengthPtr; /* Array of precomputed inv. normal lengths */
-
- /* Holds malloced storage for pipeline data not supplied by
+
+ /* Holds malloced storage for pipeline data not supplied by
* the immediate struct.
*/
GLvector4f Eye;
GLvector4ub BSecondary; /* not used in cva vb's */
/* Temporary storage - may point into IM, or be dynamically
- * allocated (for cva).
+ * allocated (for cva).
*/
GLubyte *ClipMask;
GLubyte *UserClipMask;
-
+
/* Internal values. Where these point depends on whether
* there were any identity matrices defined as transformations
* in the pipeline.
GLvector1ui *Index[2];
GLvector4ub *SecondaryColor[2];
- /* Storage for colors which have been lit but not yet fogged.
+ /* Storage for colors which have been lit but not yet fogged.
* Required for CVA, just point into store for normal VB's.
*/
GLvector4ub *LitColor[2];
*/
GLuint *EvaluatedFlags;
- /* Not used for cva:
+ /* Not used for cva:
*/
GLubyte *NormCullStart;
GLubyte *CullMask; /* Results of vertex culling */
typedef void (*clip_interp_func)( struct vertex_buffer *VB, GLuint dst,
GLfloat t, GLuint in, GLuint out );
-typedef GLuint (*clip_line_func)( struct vertex_buffer *VB,
+typedef GLuint (*clip_line_func)( struct vertex_buffer *VB,
GLuint *i, GLuint *j,
GLubyte mask);
-typedef void (*texgen_func)( struct vertex_buffer *VB,
+typedef void (*texgen_func)( struct vertex_buffer *VB,
GLuint textureSet);
*/
GLuint opcode_vertex_cassette;
- /* Cva
+ /* Cva
*/
struct gl_cva CVA;
GLboolean CompileCVAFlag;
clip_poly_func *_poly_clip_tab;
clip_line_func *_line_clip_tab;
clip_interp_func _ClipInterpFunc; /* Clip interpolation function */
- normal_func *_NormalTransform;
+ normal_func *_NormalTransform;
gl_shade_func *_shade_func_tab; /* Current shading function table */
GLenum _CurrentPrimitive; /* Prim or GL_POLYGON+1 */
GLuint _RenderFlags; /* Active inputs to render stage */
/* Cache of unused immediate structs */
- struct immediate *freed_im_queue;
+ struct immediate *freed_im_queue;
GLuint nr_im_queued;
} TNLcontext;
extern void
-_tnl_MakeCurrent( GLcontext *ctx,
- GLframebuffer *drawBuffer,
+_tnl_MakeCurrent( GLcontext *ctx,
+ GLframebuffer *drawBuffer,
GLframebuffer *readBuffer );
-/* $Id: t_pipeline.c,v 1.2 2000/11/20 18:06:13 brianp Exp $ */
+/* $Id: t_pipeline.c,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2000 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
#include "mem.h"
#include "mmath.h"
#include "state.h"
-#include "types.h"
+#include "mtypes.h"
#include "math/m_translate.h"
#include "math/m_xform.h"
void gl_print_pipe_ops( const char *msg, GLuint flags )
{
- fprintf(stderr,
+ fprintf(stderr,
"%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s\n",
msg,
flags,
TNLcontext *tnl = TNL_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_PIPELINE)
- gl_print_pipe_ops( "reset cva vb", stages );
+ gl_print_pipe_ops( "reset cva vb", stages );
- if (stages & PIPE_OP_VERT_XFORM)
+ if (stages & PIPE_OP_VERT_XFORM)
{
if (VB->ClipOrMask & CLIP_USER_BIT)
MEMSET(VB->UserClipMask, 0, VB->Count);
VB->NormalPtr = &tnl->CVA.v.Normal;
}
- if (stages & PIPE_OP_LIGHT)
+ if (stages & PIPE_OP_LIGHT)
{
VB->ColorPtr = VB->Color[0] = VB->Color[1] = &tnl->CVA.v.Color;
VB->IndexPtr = VB->Index[0] = VB->Index[1] = &tnl->CVA.v.Index;
}
- else if (stages & PIPE_OP_FOG)
+ else if (stages & PIPE_OP_FOG)
{
if (ctx->Light.Enabled) {
VB->Color[0] = VB->LitColor[0];
- VB->Color[1] = VB->LitColor[1];
+ VB->Color[1] = VB->LitColor[1];
VB->Index[0] = VB->LitIndex[0];
- VB->Index[1] = VB->LitIndex[1];
+ VB->Index[1] = VB->LitIndex[1];
} else {
VB->Color[0] = VB->Color[1] = &tnl->CVA.v.Color;
VB->Index[0] = VB->Index[1] = &tnl->CVA.v.Index;
p->type = type;
p->ops = 0;
- for (i = 0 ; i < gl_default_nr_stages ; i++)
+ for (i = 0 ; i < gl_default_nr_stages ; i++)
p->state_change |= gl_default_pipeline[i].state_change;
}
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- MEMCPY( tnl->PipelineStage,
- gl_default_pipeline,
+ MEMCPY( tnl->PipelineStage,
+ gl_default_pipeline,
sizeof(*gl_default_pipeline) * gl_default_nr_stages );
-
+
tnl->NrPipelineStages = gl_default_nr_stages;
-
+
pipeline_ctr( &tnl->CVA.elt, ctx, PIPE_IMMEDIATE);
pipeline_ctr( &tnl->CVA.pre, ctx, PIPE_PRECALC );
}
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct gl_pipeline_stage *pipeline = tnl->PipelineStage;
struct gl_cva *cva = &tnl->CVA;
- struct gl_pipeline *pre = &cva->pre;
+ struct gl_pipeline *pre = &cva->pre;
struct gl_pipeline_stage **stages = pre->stages;
GLuint i;
GLuint newstate = pre->new_state;
GLuint changed_ops = 0;
GLuint oldoutputs = pre->outputs;
GLuint oldinputs = pre->inputs;
- GLuint fallback = (VERT_CURRENT_DATA & tnl->_CurrentFlag &
+ GLuint fallback = (VERT_CURRENT_DATA & tnl->_CurrentFlag &
~tnl->_ArraySummary);
- GLuint changed_outputs = (tnl->_ArrayNewState |
+ GLuint changed_outputs = (tnl->_ArrayNewState |
(fallback & cva->orflag));
GLuint available = fallback | tnl->_ArrayFlags;
*/
newstate = ~0;
- if (tnl->_ArraySummary & VERT_ELT)
+ if (tnl->_ArraySummary & VERT_ELT)
cva->orflag &= VERT_MATERIAL;
-
+
cva->orflag &= ~(tnl->_ArraySummary & ~VERT_OBJ_ANY);
available &= ~cva->orflag;
-
+
pre->outputs = available;
pre->inputs = available;
fprintf(stderr, ": Rebuild pipeline\n");
gl_print_vert_flags("orflag", cva->orflag);
}
-
-
+
+
/* If something changes in the pipeline, tag all subsequent stages
* using this value for recalcuation. Also used to build the full
* are enough to fully specify what needs to be calculated, and a
* single pass identifies all stages requiring recalculation.
*/
- for (i = 0 ; i < tnl->NrPipelineStages ; i++)
+ for (i = 0 ; i < tnl->NrPipelineStages ; i++)
{
pipeline[i].check(ctx, &pipeline[i]);
- if (pipeline[i].type & PIPE_PRECALC)
+ if (pipeline[i].type & PIPE_PRECALC)
{
if ((newstate & pipeline[i].cva_state_change) ||
(changed_outputs & pipeline[i].inputs) ||
!pipeline[i].inputs)
- {
+ {
changed_ops |= pipeline[i].ops;
changed_outputs |= pipeline[i].outputs;
pipeline[i].active &= ~PIPE_PRECALC;
{
pipeline[i].active |= PIPE_PRECALC;
*stages++ = &pipeline[i];
- }
+ }
}
-
+
/* Incompatible with multiple stages structs implementing
* the same stage.
*/
available |= pipeline[i].outputs;
pre->forbidden_inputs |= pipeline[i].pre_forbidden_inputs;
}
- }
- else if (pipeline[i].active & PIPE_PRECALC)
+ }
+ else if (pipeline[i].active & PIPE_PRECALC)
{
pipeline[i].active &= ~PIPE_PRECALC;
changed_outputs |= pipeline[i].outputs;
void gl_build_precalc_pipeline( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct gl_pipeline *pre = &tnl->CVA.pre;
- struct gl_pipeline *elt = &tnl->CVA.elt;
+ struct gl_pipeline *pre = &tnl->CVA.pre;
+ struct gl_pipeline *elt = &tnl->CVA.elt;
if (!ctx->Driver.BuildPrecalcPipeline ||
!ctx->Driver.BuildPrecalcPipeline( ctx ))
pre->data_valid = 0;
pre->pipeline_valid = 1;
elt->pipeline_valid = 0;
-
+
tnl->CVA.orflag = 0;
-
+
if (MESA_VERBOSE&VERBOSE_PIPELINE)
- gl_print_pipeline( ctx, pre );
+ gl_print_pipeline( ctx, pre );
}
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct gl_pipeline_stage *pipeline = tnl->PipelineStage;
struct gl_cva *cva = &tnl->CVA;
- struct gl_pipeline *pre = &cva->pre;
+ struct gl_pipeline *pre = &cva->pre;
struct gl_pipeline *elt = &cva->elt;
struct gl_pipeline_stage **stages = elt->stages;
GLuint i;
pipeline[i].active &= ~PIPE_IMMEDIATE;
if ((pipeline[i].state_change & newstate) ||
- (pipeline[i].elt_forbidden_inputs & available))
+ (pipeline[i].elt_forbidden_inputs & available))
{
pipeline[i].check(ctx, &pipeline[i]);
}
if ((pipeline[i].type & PIPE_IMMEDIATE) &&
- (pipeline[i].ops & active_ops) == 0 &&
+ (pipeline[i].ops & active_ops) == 0 &&
(pipeline[i].elt_forbidden_inputs & available) == 0
)
{
- if (pipeline[i].inputs & ~available)
+ if (pipeline[i].inputs & ~available)
elt->forbidden_inputs |= pipeline[i].inputs & ~available;
else
{
}
*stages = 0;
-
+
elt->copy_transformed_data = 1;
elt->replay_copied_vertices = 0;
void gl_build_immediate_pipeline( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct gl_pipeline *elt = &tnl->CVA.elt;
+ struct gl_pipeline *elt = &tnl->CVA.elt;
if (!ctx->Driver.BuildEltPipeline ||
!ctx->Driver.BuildEltPipeline( ctx )) {
elt->pipeline_valid = 1;
tnl->CVA.orflag = 0;
-
+
if (MESA_VERBOSE&VERBOSE_PIPELINE)
- gl_print_pipeline( ctx, elt );
+ gl_print_pipeline( ctx, elt );
}
-
+
#define INTERESTED ~0
void gl_update_pipelines( GLcontext *ctx )
cva->lock_changed ||
cva->orflag != cva->last_orflag ||
tnl->_ArrayFlags != cva->last_array_flags)
- {
+ {
GLuint flags = VERT_WIN;
if (ctx->Visual.RGBAflag) {
flags |= VERT_RGBA;
if (ctx->_TriangleCaps && DD_SEPERATE_SPECULAR)
flags |= VERT_SPEC_RGB;
- } else
+ } else
flags |= VERT_INDEX;
- if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY)
+ if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY)
flags |= VERT_TEX0_ANY;
if (ctx->Texture._ReallyEnabled & TEXTURE1_ANY)
if (ctx->Texture._ReallyEnabled & TEXTURE3_ANY)
flags |= VERT_TEX3_ANY;
#endif
-
- if (ctx->Polygon._Unfilled)
+
+ if (ctx->Polygon._Unfilled)
flags |= VERT_EDGE;
-
+
if (ctx->Fog.FogCoordinateSource == GL_FOG_COORDINATE_EXT)
flags |= VERT_FOG_COORD;
pipe->data_valid = 1; /* optimized stages might want to reset this. */
if (0) gl_print_pipeline( VB->ctx, pipe );
-
+
START_FAST_MATH(x);
-
- for ( VB->Culled = 0; *stages && !VB->Culled ; stages++ )
+
+ for ( VB->Culled = 0; *stages && !VB->Culled ; stages++ )
(*stages)->run( VB );
END_FAST_MATH(x);
-/* $Id: t_pipeline.h,v 1.1 2000/11/16 21:05:42 keithw Exp $ */
+/* $Id: t_pipeline.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#ifndef _T_PIPELINE_H_
#define _T_PIPELINE_H_
-#include "types.h"
+#include "mtypes.h"
#include "t_context.h"
extern void gl_update_materials( struct vertex_buffer *VB);
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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
#ifndef _TNL_H
#define _TNL_H
-#include "types.h"
+#include "mtypes.h"