Fixed some issues in gl_texmgr.
Continued expanding on material system.