Added texture loading function