writeTexture