summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_array_import.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-04-08 02:27:16 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-04-08 02:27:16 +0000
commit36a0a3252e1e20df69b53f70ba93bc74c4a4bf0e (patch)
tree6c680de320af7a288fe70e5a95696bcf0f5faa56 /src/mesa/tnl/t_array_import.c
parent0cebd5822a39ad3b3d7621f8e59efab329bfb5b9 (diff)
Added ctx->Texture._EnabledCoordUnits bitfield.
Fixed some vertex array / vertex program glitches with glDrawElements. Fixed some fragment program runtime bugs. Non-trivial Cg programs are running now.
Diffstat (limited to 'src/mesa/tnl/t_array_import.c')
-rw-r--r--src/mesa/tnl/t_array_import.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c
index 2a8506aa42..fbcb9b3310 100644
--- a/src/mesa/tnl/t_array_import.c
+++ b/src/mesa/tnl/t_array_import.c
@@ -1,4 +1,4 @@
-/* $Id: t_array_import.c,v 1.28 2003/03/01 01:50:26 brianp Exp $ */
+/* $Id: t_array_import.c,v 1.29 2003/04/08 02:27:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -363,6 +363,22 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
_ac_import_range( ctx, start, count );
+ /* When vertex program mode is enabled, the generic vertex program
+ * attribute arrays have priority over the conventional attributes.
+ * Try to use them now.
+ */
+ if (ctx->VertexProgram.Enabled) {
+ GLuint index;
+ for (index = 0; index < VERT_ATTRIB_MAX; index++) {
+ /* XXX check program->InputsRead to reduce work here */
+ _tnl_import_attrib( ctx, index, GL_FALSE, GL_TRUE );
+ VB->AttribPtr[index] = &tmp->Attribs[index];
+ }
+ }
+
+ /*
+ * Conventional attributes
+ */
if (inputs & VERT_BIT_POS) {
_tnl_import_vertex( ctx, 0, 0 );
tmp->Obj.count = VB->Count;
@@ -418,14 +434,4 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
VB->SecondaryColorPtr[1] = 0;
}
}
-
- /* XXX not 100% sure this is finished. Keith should probably inspect. */
- if (ctx->VertexProgram.Enabled) {
- GLuint index;
- for (index = 0; index < VERT_ATTRIB_MAX; index++) {
- /* XXX check program->InputsRead to reduce work here */
- _tnl_import_attrib( ctx, index, GL_FALSE, GL_TRUE );
- VB->AttribPtr[index] = &tmp->Attribs[index];
- }
- }
}