I've been enhancing the material system these past couple of days -- I've added GLSL materials, material rendering stacks and other features. I decided it was time to implement a couple of classes to make material management easier.
I went off and implemented a "material cache," which holds onto materials that have been requested recently. The important thing here is that I'm now loading
materials -- they're defined in XML, like so...
Of course, there's little bugs (Include
directives don't catch infinite recursion, there's no support for multiple passes of shaders, and it's arguably pretty useless right now without a material stack added), but it's pretty awesome overall and seems to work. I've also added a multitexture material type, but haven't had a chance to test it out yet.
The end result of all this chicanery? It could be the nice new Gooch shader that I added to my little bag of tricks.
The mission of making Novarunner the most pointlessly gorgeous space trading sim ever is starting to get there. Now just to find some models