-/* $Id: t_context.h,v 1.21 2001/04/28 08:39:18 keithw Exp $ */
+/* $Id: t_context.h,v 1.28 2001/06/04 16:09:28 keithw Exp $ */
/*
* Mesa 3-D graphics library
GLuint ArrayEltFlags; /* precalc'ed for glArrayElt */
GLuint ArrayEltIncr;
GLuint ArrayEltFlush;
+
+#define FLUSH_ELT_EAGER 0x1
+#define FLUSH_ELT_LAZY 0x2
GLuint FlushElt;
GLuint MaxTextureUnits; /* precalc'ed for glMultiTexCoordARB */
GLuint importable_data;
+ void *import_source;
void (*import_data)( GLcontext *ctx, GLuint flags, GLuint vecflags );
/* Callback to the provider of the untransformed input for the
* render stage (or other stages) to call if they need to write into
GLuint run_state_changes; /* state changes since last run */
GLuint run_input_changes; /* VERT_* changes since last run */
GLuint inputs; /* VERT_* inputs to pipeline */
- struct gl_pipeline_stage stages[MAX_PIPELINE_STAGES];
+ struct gl_pipeline_stage stages[MAX_PIPELINE_STAGES+1];
GLuint nr_stages;
};
typedef void (*render_func)( GLcontext *ctx, GLuint start, GLuint count,
GLuint flags );
typedef void (*interp_func)( GLcontext *ctx,
- GLfloat t, GLuint dst, GLuint in, GLuint out,
+ GLfloat t, GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary );
typedef void (*copy_pv_func)( GLcontext *ctx, GLuint dst, GLuint src );
*** TNL Pipeline
***/
- void (*PipelineStart)(GLcontext *ctx);
- void (*PipelineFinish)(GLcontext *ctx);
- /* Called before and after all pipeline stages.
- * These are a suitable place for grabbing/releasing hardware locks.
+ void (*RunPipeline)(GLcontext *ctx);
+ /* Replaces PipelineStart/PipelineFinish -- intended to allow
+ * drivers to wrap _tnl_run_pipeline() with code to validate state
+ * and grab/release hardware locks.
*/
/***
*/
interp_func RenderInterp;
+ /* The interp function is called by the clipping routines when we need
+ * to generate an interpolated vertex. All pertinant vertex ancilliary
+ * data should be computed by interpolating between the 'in' and 'out'
+ * vertices.
+ */
+
copy_pv_func RenderCopyPV;
+ /* The copy function is used to make a copy of a vertex. All pertinant
+ * vertex attributes should be copied.
+ */
+
void (*RenderClippedPolygon)( GLcontext *ctx, const GLuint *elts, GLuint n );
- void (*RenderClippedLine)( GLcontext *ctx, GLuint v0, GLuint v1 );
- /* Functions to interpolate between prebuilt vertices, copy flat-shade
- * provoking color, and to render clipped primitives.
+ /* Render a polygon with <n> vertices whose indexes are in the <elts>
+ * array.
*/
+ void (*RenderClippedLine)( GLcontext *ctx, GLuint v0, GLuint v1 );
+ /* Render a line between the two vertices given by indexes v0 and v1. */
+
points_func PointsFunc; /* must now respect vb->elts */
line_func LineFunc;
triangle_func TriangleFunc;
render_func *RenderTabElts;
/* Render whole unclipped primitives (points, lines, linestrips,
* lineloops, etc). The tables are indexed by the GL enum of the
- * primitive to be rendered.
+ * primitive to be rendered. RenderTabVerts is used for non-indexed
+ * arrays of vertices. RenderTabElts is used for indexed arrays of
+ * vertices.
*/
void (*ResetLineStipple)( GLcontext *ctx );
* objects.
*/
GLboolean ReplayHardBeginEnd;
- GLenum CurrentPrimitive;
/* Note which vertices need copying over succesive immediates.
* Will add save versions to precompute vertex copying where
GLuint DlistPrimitiveLength;
GLuint DlistLastPrimitive;
+ /* Cache a single free immediate (refcount == 0)
+ */
+ struct immediate *freed_immediate;
+
/* Probably need a better configuration mechanism:
*/
GLboolean NeedProjCoords;
+ GLboolean LoopbackDListCassettes;
/* Derived state and storage for _tnl_eval_vb:
*/