Strange Problem with vertex arrayss

I am getting lost…

can you tell me the difference between this two codes? One is with vertex array and the other is without vertex array.

http://rafb.net/paste/results/JeK0ZU11.html

The shader has this parameters:

fragment shader:

PARAM light0color = state.light[0].diffuse;
PARAM ambient = state.lightmodel.ambient;
PARAM light0atten = state.light[0].attenuation;

vertex shader:

PARAM mvi[4] = {state.matrix.modelview.inverse};
PARAM mvit[4] = {state.matrix.modelview.invtrans};
PARAM mvp[4] = {state.matrix.mvp};

ATTRIB tangent = vertex.texcoord[1];
ATTRIB binormal = vertex.texcoord[2];
ATTRIB normal = vertex.normal;

thsi is the code with the parameters only. not all the code.

The problem i have is at lighting. using vertex arrays is not correct.

any idea what is wrong?
thanks in advance!

Well, by looking at ur code i noticed u didn’t enable the ‘GL_TEXTURE_COORD_ARRAY’ client state for each Tex Unit…Give that a try, Insert it after each ‘glActiveTextureARB()’ call.

Twixn

hey man! thats it!I didnt knew that I must enable the ‘GL_TEXTURE_COORD_ARRAY’ for all the texture units. thank you