renamed to attachTexture