update texture binding code