Add an update function to texture