switch texture loading to resource based