Currently processing is happening in main setup function, while I think it should be a separated module with fields. Those fields will indicate number of: textures during loading, programs during compilation, fonts during loading.
Each module will import this object, modify their own fields, and getter will take care of notify outside world if processing has ended.