merged changes to texture manager, drawmanager etc.