Added switch texture functionality