void Renderer::printRendererStatus(RendererStatusVerbosity verbosity, const StringIdMap & stringMap, std::ostream & out) const { out << "Renderer status" << std::endl; out << "---------------" << std::endl; out << "Model count: " << models.size() << std::endl; out << "Shaders: "; for (auto i = shaders.begin(); i != shaders.end(); i++) { if (i != shaders.begin()) out << ", "; out << i->first; if (!i->second.defines.empty()) { out << "("; for (auto d = i->second.defines.begin(); d != i->second.defines.end(); d++) { if (d != i->second.defines.begin()) out << "/"; out << *d; } out << ")"; } } out << std::endl; std::string passPrefix = " "; // Print shared textures. if (verbosity >= VERBOSITY_MODELS_TEXTURES) { out << "Global textures: " << sharedTextures.size() << std::endl; for (const auto & st : sharedTextures) out << passPrefix << stringMap.getString(st.first) << ", handle " << st.second.handle << std::endl; } out << "Passes: " << passes.size() << std::endl; int passcount = 0; for (const auto & pass : passes) { out << "Pass \"" << pass.getName() << "\"" << std::endl; out << passPrefix << "Draw groups: "; int dgcount = 0; for (const auto & dg : drawGroupToPasses) if (std::find(dg.second.begin(), dg.second.end(), passcount) != dg.second.end()) { if (dgcount != 0) out << ", "; out << stringMap.getString(dg.first); dgcount++; } out << std::endl; pass.printRendererStatus(verbosity, stringMap, out); passcount++; } }
void Renderer::printRendererStatus(RendererStatusVerbosity verbosity, const StringIdMap & stringMap, std::ostream & out) const { out << "Renderer status" << std::endl; out << "---------------" << std::endl; out << "Model count: " << models.size() << std::endl; out << "Shaders: "; for (std::map <std::string, RenderShader>::const_iterator i = shaders.begin(); i != shaders.end(); i++) { if (i != shaders.begin()) out << ", "; out << i->first; if (!i->second.defines.empty()) { out << "("; for (std::set <std::string>::const_iterator d = i->second.defines.begin(); d != i->second.defines.end(); d++) { if (d != i->second.defines.begin()) out << "/"; out << *d; } out << ")"; } } out << std::endl; std::string passPrefix = " "; // Print shared textures. if (verbosity >= VERBOSITY_MODELS_TEXTURES) { out << "Global textures: " << sharedTextures.size() << std::endl; for (NameTexMap::const_iterator i = sharedTextures.begin(); i != sharedTextures.end(); i++) out << passPrefix << stringMap.getString(i->first) << ", handle " << i->second.handle << std::endl; } out << "Passes: " << passes.size() << std::endl; int passcount = 0; for (std::vector <RenderPass>::const_iterator i = passes.begin(); i != passes.end(); i++,passcount++) { out << "Pass \"" << i->getName() << "\"" << std::endl; out << passPrefix << "Draw groups: "; int dgcount = 0; for (NameIdVecMap::const_iterator dg = drawGroupToPasses.begin(); dg != drawGroupToPasses.end(); dg++) if (std::find(dg->second.begin(), dg->second.end(), passcount) != dg->second.end()) { if (dgcount != 0) out << ", "; out << stringMap.getString(dg->first); dgcount++; } out << std::endl; i->printRendererStatus(verbosity, stringMap, out); } }