summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-11-24 10:25:05 +0000
committerKeith Whitwell <[email protected]>2000-11-24 10:25:05 +0000
commitad2ac216fa0cbebc36530bf9e5256e902710b892 (patch)
tree2b44b0129679558d0a1760bf94d75bcdbfe145ad /src/mesa/main/varray.c
parent00608a79dce1ea5e274f35b0a1883f7b623b9d7a (diff)
Support for swappable t&l modules, including an example one in the FX
driver (enable with FX_ALLOW_VTXFMT=t).
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index d03f0b79ff0..7b9b1052c21 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1,4 +1,4 @@
-/* $Id: varray.c,v 1.32 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: varray.c,v 1.33 2000/11/24 10:25:06 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -692,3 +692,48 @@ _mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer)
+/* Transform the array components now, upto the setup call. When
+ * actual draw commands arrive, the data will be merged prior to
+ * calling render_vb.
+ */
+void
+_mesa_LockArraysEXT(GLint first, GLsizei count)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, "glLockArraysEXT" );
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ fprintf(stderr, "glLockArrays %d %d\n", first, count);
+
+ if (first == 0 && count > 0 && count <= ctx->Const.MaxArrayLockSize) {
+ ctx->Array.LockFirst = first;
+ ctx->Array.LockCount = count;
+ }
+ else {
+ ctx->Array.LockFirst = 0;
+ ctx->Array.LockCount = 0;
+ }
+
+ ctx->NewState |= _NEW_ARRAY;
+
+ if (ctx->Driver.LockArraysEXT)
+ ctx->Driver.LockArraysEXT( ctx, first, count );
+}
+
+
+void
+_mesa_UnlockArraysEXT( void )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, "glUnlockArraysEXT" );
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ fprintf(stderr, "glUnlockArrays\n");
+
+ ctx->Array.LockFirst = 0;
+ ctx->Array.LockCount = 0;
+ ctx->NewState |= _NEW_ARRAY;
+
+ if (ctx->Driver.UnlockArraysEXT)
+ ctx->Driver.UnlockArraysEXT( ctx );
+}