   Texture in Shader
  Hi folks..Is it possible to generate texture coords in a vertex shader only if texturing is enabled in OpenGL for that level. Clearly,In my shader i have something likegl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;I want this to be generated only if glEnable(GL_TEXTURE_2D) was called for level 1 texture. In other words, I dont want the texture coords to be generated if it is not enabled. Currently, even if I call glDisable(GL_TEXTURE_2D) for level 1 texture after binding it, the shader generates texture co-ords for level1. Thank You..   
  AFAIK there is no built in variable that you can query for enabled TMU's.  What you could do is either pass in a uniform with the state (this will probably be slower then just generating the extra coords) or compile multiple shaders.btw texture coords don't necessarily contain texture coordinates, for example I also use them to pass the vertex tangent.Have a look at the GLSL spec, it contains the Built in variables/functions and if you can give more information about what you want to do there may be a better solution.HTH