diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llwindow/llgl.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/linden/indra/llwindow/llgl.cpp b/linden/indra/llwindow/llgl.cpp index 35f20d3..df87591 100644 --- a/linden/indra/llwindow/llgl.cpp +++ b/linden/indra/llwindow/llgl.cpp | |||
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #include "linden_common.h" | 37 | #include "linden_common.h" |
38 | 38 | ||
39 | #include "boost/tokenizer.hpp" | ||
40 | |||
39 | #include "llsys.h" | 41 | #include "llsys.h" |
40 | 42 | ||
41 | #include "llgl.h" | 43 | #include "llgl.h" |
@@ -459,6 +461,23 @@ bool LLGLManager::initGL() | |||
459 | return true; | 461 | return true; |
460 | } | 462 | } |
461 | 463 | ||
464 | void LLGLManager::getGLInfo(LLSD& info) | ||
465 | { | ||
466 | info["GLInfo"]["GLVendor"] = LLString((const char *)glGetString(GL_VENDOR)); | ||
467 | info["GLInfo"]["GLRenderer"] = LLString((const char *)glGetString(GL_RENDERER)); | ||
468 | info["GLInfo"]["GLVersion"] = LLString((const char *)glGetString(GL_VERSION)); | ||
469 | |||
470 | #if !LL_MESA_HEADLESS | ||
471 | LLString all_exts = (const char *)gGLHExts.mSysExts; | ||
472 | boost::char_separator<char> sep(" "); | ||
473 | boost::tokenizer<boost::char_separator<char> > tok(all_exts, sep); | ||
474 | for(boost::tokenizer<boost::char_separator<char> >::iterator i = tok.begin(); i != tok.end(); ++i) | ||
475 | { | ||
476 | info["GLInfo"]["GLExtensions"].append(*i); | ||
477 | } | ||
478 | #endif | ||
479 | } | ||
480 | |||
462 | LLString LLGLManager::getGLInfoString() | 481 | LLString LLGLManager::getGLInfoString() |
463 | { | 482 | { |
464 | LLString info_str; | 483 | LLString info_str; |