New texture handling routine.