2 * GLX Hardware Device Driver for Intel tdfx
3 * Copyright (C) 1999 Keith Whitwell
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 #include "main/mtypes.h"
32 #include "tnl/t_context.h"
33 #include "math/m_xform.h"
35 #define TDFX_XYZ_BIT 0x1
36 #define TDFX_W_BIT 0x2
37 #define TDFX_RGBA_BIT 0x4
38 #define TDFX_TEX1_BIT 0x8
39 #define TDFX_TEX0_BIT 0x10
40 #define TDFX_PTEX_BIT 0x20
41 #define TDFX_FOGC_BIT 0x40
42 #define TDFX_MAX_SETUP 0x80
44 #define _TDFX_NEW_RASTERSETUP (_NEW_TEXTURE | \
45 _DD_NEW_SEPARATE_SPECULAR | \
46 _DD_NEW_TRI_UNFILLED | \
47 _DD_NEW_TRI_LIGHT_TWOSIDE | \
51 extern void tdfxValidateBuildProjVerts(GLcontext
*ctx
,
52 GLuint start
, GLuint count
,
55 extern void tdfxPrintSetupFlags(char *msg
, GLuint flags
);
57 extern void tdfxInitVB( GLcontext
*ctx
);
59 extern void tdfxFreeVB( GLcontext
*ctx
);
61 extern void tdfxCheckTexSizes( GLcontext
*ctx
);
63 extern void tdfxChooseVertexState( GLcontext
*ctx
);
65 extern void tdfxBuildVertices( GLcontext
*ctx
, GLuint start
, GLuint end
,