Skip to content

Commit

Permalink
IGL: Print extensions one per line
Browse files Browse the repository at this point in the history
Summary: This diff updates extension printing when extensions are stored in an extension map to print one extension per line. This is because Android cuts off log line length after a certin point so not all extensions are visible.

Reviewed By: nlutsenko

Differential Revision: D50061125

fbshipit-source-id: 21af22e6e71176299de846ca9216d475997ffde4
  • Loading branch information
Eric Griffith authored and facebook-github-bot committed Oct 10, 2023
1 parent 272de50 commit 4bb5dd5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/igl/opengl/IContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3477,14 +3477,10 @@ void IContext::initialize(Result* result) {
std::vector<std::string> sortedExtensions(supportedExtensions.begin(),
supportedExtensions.end());
std::sort(sortedExtensions.begin(), sortedExtensions.end());
std::stringstream extensionsLog;
for (auto it = sortedExtensions.begin(); it != sortedExtensions.end(); ++it) {
extensionsLog << *it;
if (it != std::prev(sortedExtensions.end())) {
extensionsLog << ", ";
}
IGL_LOG_INFO("GL Extensions:\n");
for (const auto& extension : sortedExtensions) {
IGL_LOG_INFO(extension.c_str());
}
IGL_LOG_INFO("GL Extensions: %s\n", extensionsLog.str().c_str());
}
#endif

Expand Down

0 comments on commit 4bb5dd5

Please sign in to comment.