GLSL Texture Problem

Hey,
I’m trying to support etc1, but I have some problems with my textures i’m passing to my GLSL shader:

in my Sprite.cpp

    GLProgram* glp = new GLProgram();
    glp->autorelease();

    glp->initWithFilenames("testv.vsh", "test.fsh");
    glp->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION);
    glp->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_COLOR, GLProgram::VERTEX_ATTRIB_COLOR);
    glp->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::VERTEX_ATTRIB_TEX_COORD);
    glp->link();
    glp->updateUniforms();
    
    Texture2D* tex = Director::getInstance()->getTextureCache()->addImage(alpha_file);
    GL::bindTexture2DN(1, tex->getName());



    this->setBlendFunc((BlendFunc) { GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA });
    
    GLuint t1Location = glGetUniformLocation(glp->getProgram(), "tex1");
    
    glp->setUniformLocationWith1i(t1Location, 1);
    setGLProgram(glp);

Vertex Shader

attribute vec4 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;
					

varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
varying vec2 v_texCoord2;


uniform sampler2D tex1;

void main()
{
    gl_Position = CC_PMatrix * a_position;
	v_fragmentColor = a_color;
	v_texCoord = a_texCoord;
    v_texCoord2 = v_texCoord;

}

Fragment Shader

varying vec4 v_fragmentColor;	
varying vec2 v_texCoord;
varying vec2 v_texCoord2;

uniform sampler2D tex1;


void main()
{
    vec3 tex = texture2D(CC_Texture0, v_texCoord).rgb;
    float alpha = texture2D(CC_Texture1, v_texCoord).r;
    
    gl_FragColor = vec4(tex.rgb,alpha);
}

Somehow it only takes the alpha texture of the first texture i’ve added for all my sprites.
The filename of my alpha textures which is added to the GLProgramm is correct, and the rgb texture i’m using for the sprite is also the right one.

can anyone help?

ok, seems like it doesn’t pass the texture to GLSL.
anyone can help?

i think i found the solution