These two texParameteri calls are unnecessary. The WRAP_S and WRAP_T state is per texture object, not per texture unit. When texture1 is bound, the texture state set up in createTexture takes effect.