Currently, specifying an interleaved array with a texcoord part assigns the texcoords to TMU 0 and disables GL_TEXTURE_COORD_ARRAY for all others
Specifying an interleaved array without a texcoord part disables GL_TEXTURE_COORD_ARRAY for all TMUs
Reading the ARB_multitexture / 1.2.1 spec, it appears to me that the correct behavior is:
1) If texcoord is specified in the interleaved array, assign the texcoords to the current client TMU and enable GL_TEXTURE_COORD_ARRAY in same
2) otherwise, disable GL_TEXTURE_COORD_ARRAY in the current client TMU
The support for this is given in the interleaved arrays section of the spec, which says that a call to interleaved arrays is equivalent to a given code block.
In that code block, there are no calls to ClientActiveTextureARB, and the multitexture spec doesn't change this either. Therefore, we can't touch
anything other than the current TMU since the equivalent code doesn't either.
Also, current behavior doesn't really make sense
Here is a patch that should give correct behavior:
Index: src/mesa/main/varray.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/main/varray.c,v retrieving revision 1.62 diff -u -r1.62 varray.c --- src/mesa/main/varray.c 3 Mar 2004 15:35:08 -0000 1.62 +++ src/mesa/main/varray.c 10 Mar 2004 03:30:39 -0000 @@ -625,7 +625,6 @@ const GLint toffset = 0; /* always zero */ GLint defstride; /* default stride */ GLint c, f; - GLint coordUnitSave;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -756,31 +755,14 @@ _mesa_DisableClientState( GL_INDEX_ARRAY );
/* Texcoords */
- coordUnitSave = ctx->Array.ActiveTexture;
if (tflag) {
- GLuint i=0;
- /* enable unit 0 texcoord array */
- _mesa_ClientActiveTextureARB( GL_TEXTURE0_ARB );
_mesa_EnableClientState( GL_TEXTURE_COORD_ARRAY );
_mesa_TexCoordPointer( tcomps, GL_FLOAT, stride,
(GLubyte *) pointer + i * toffset );
- /* disable all other texcoord arrays */
- for (i = 1; i < ctx->Const.MaxTextureCoordUnits; i++) {
- _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) );
- _mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY );
- }
}
else {
- /* disable all texcoord arrays */
- GLuint i;
- for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) );
- _mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY );
- }
+ _mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY );
}
- /* Restore texture coordinate unit index */
- _mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + coordUnitSave) );
-
/* Color */
if (cflag) {------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
