cocos2dx-GLProgram结合RenderTexture在安卓手机不能用

	glProgram1 = new CCGLProgram();
	glProgram1->retain();
	glProgram1->initWithVertexShaderFilename("test.vsh", "test.fsh");
	glProgram1->addAttribute(kCCAttributeNameTexCoord, kCCVertexAttrib_TexCoords);
        
        //要设置一下三行属性,否则在安卓上画不出来
	glProgram1->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_POSITION, GLProgram::VERTEX_ATTRIB_POSITION);

	glProgram1->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_COLOR, GLProgram::VERTEX_ATTRIB_COLOR);

	glProgram1->bindAttribLocation(GLProgram::ATTRIBUTE_NAME_TEX_COORD, GLProgram::VERTEX_ATTRIB_TEX_COORDS);
	

        glProgram1->link();
	glProgram1->updateUniforms();

你可能感兴趣的:(cocos2dx-GLProgram结合RenderTexture在安卓手机不能用)