Changed several state singletons to operate on individual gl contexts.