This partly works, but my texture assignements are all lost...