add automatic texture loading and setting