Fixed everything. Also, uses compile-time polymorphism for windows now

I'm gonna do compile-time polymorphism for rendering backend as well soon.