-/* $Id: t_context.h,v 1.37 2002/01/22 14:35:16 brianp Exp $ */
+/* $Id: t_context.h,v 1.44 2003/01/14 04:55:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
#define VERT_BIT_CLIP VERT_BIT_END /* vb only, reuse imm bit*/
-
/* Flags for IM->TexCoordSize. Enough flags for 16 units.
*/
-#define TEX_0_SIZE_3 0x1
-#define TEX_0_SIZE_4 0x10001
+#define TEX_0_SIZE_3 (unsigned)0x1
+#define TEX_0_SIZE_4 (unsigned)0x10001
#define TEX_SIZE_3(unit) (TEX_0_SIZE_3 << (unit))
#define TEX_SIZE_4(unit) (TEX_0_SIZE_4 << (unit))
*/
struct immediate
{
- struct __GLcontextRec *backref;
GLuint id, ref_count;
/* This must be saved when immediates are shared in display lists.
struct vertex_arrays
{
+ /* XXX move a bunch of these fields into the Attribs[] array??? */
GLvector4f Obj;
GLvector4f Normal;
struct gl_client_array Color;
struct gl_client_array SecondaryColor;
GLvector1ui Index;
GLvector1ub EdgeFlag;
- GLvector4f TexCoord[MAX_TEXTURE_UNITS];
+ GLvector4f TexCoord[MAX_TEXTURE_COORD_UNITS];
GLvector1ui Elt;
GLvector4f FogCoord;
GLvector4f Attribs[VERT_ATTRIB_MAX];
GLvector4f *NormalPtr; /* VERT_BIT_NORMAL */
GLfloat *NormalLengthPtr; /* VERT_BIT_NORMAL */
GLboolean *EdgeFlag; /* VERT_BIT_EDGEFLAG */
- GLvector4f *TexCoordPtr[MAX_TEXTURE_UNITS]; /* VERT_TEX_0..n */
+ GLvector4f *TexCoordPtr[MAX_TEXTURE_COORD_UNITS]; /* VERT_TEX_0..n */
GLvector1ui *IndexPtr[2]; /* VERT_BIT_INDEX */
struct gl_client_array *ColorPtr[2]; /* VERT_BIT_COLOR0 */
struct gl_client_array *SecondaryColorPtr[2];/* VERT_BIT_COLOR1 */
struct tnl_eval_store {
GLuint EvalMap1Flags;
GLuint EvalMap2Flags;
+ GLuint EvalMap1AttribFlags; /* GL_NV_vertex_program */
+ GLuint EvalMap2AttribFlags; /* GL_NV_vertex_program */
GLuint EvalNewState;
struct immediate *im; /* used for temporary data */
};
* and grab/release hardware locks.
*/
+ void (*NotifyMaterialChange)(GLcontext *ctx);
+ /* Alert tnl-aware drivers of changes to material.
+ */
+
+ GLboolean (*NotifyBegin)(GLcontext *ctx, GLenum p);
+ /* Allow drivers to hook in optimized begin/end engines.
+ * Return value: GL_TRUE - driver handled the begin
+ * GL_FALSE - driver didn't handle the begin
+ */
+
/***
*** Rendering -- These functions called only from t_vb_render.c
***/
GLboolean NeedNdcCoords;
GLboolean LoopbackDListCassettes;
GLboolean CalcDListNormalLengths;
+ GLboolean IsolateMaterials;
/* Derived state and storage for _tnl_eval_vb:
*/
/* Functions to be plugged into dispatch when tnl is active.
*/
GLvertexformat vtxfmt;
+ GLvertexformat save_vtxfmt;
} TNLcontext;