diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-08-23 16:41:54 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-08-23 16:41:54 +0200 |
| commit | 4a29c73403c4dc713a8a31cb96289adff2b910c1 (patch) | |
| tree | de0c6b191031bac7fb2764edb2a81382a331f81c /dep/g3dlite/source/constants.cpp | |
| parent | b90329d63acaecb1f074dd2b303561baa9f639a2 (diff) | |
| parent | 1255434882777053bca06656786abc1a598deda9 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'dep/g3dlite/source/constants.cpp')
| -rw-r--r-- | dep/g3dlite/source/constants.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dep/g3dlite/source/constants.cpp b/dep/g3dlite/source/constants.cpp index 9ee3eb8736b..53a33faa8ec 100644 --- a/dep/g3dlite/source/constants.cpp +++ b/dep/g3dlite/source/constants.cpp @@ -11,6 +11,34 @@ namespace G3D { + const char* PrimitiveType::toString(int i, Value& v) { + static const char* str[] = {"POINTS", "LINES", "LINE_STRIP", "TRIANGLES", "TRIANGLE_FAN", "QUADS", "QUAD_STRIP", NULL}; + static const Value val[] = {POINTS, LINES, LINE_STRIP, TRIANGLES, TRIANGLE_FAN, QUADS, QUAD_STRIP}; + const char* s = str[i]; + if (s) { + v = val[i]; + } + return s; + } + const char* RefractionQuality::toString(int i, Value& v) { + static const char* str[] = {"NONE", "STATIC_ENV", "DYNAMIC_FLAT", "DYNAMIC_FLAT_MULTILAYER", "DYNAMIC_ENV", "BEST", NULL}; + static const Value val[] = {NONE, STATIC_ENV, DYNAMIC_FLAT, DYNAMIC_FLAT_MULTILAYER, DYNAMIC_ENV, BEST}; + const char* s = str[i]; + if (s) { + v = val[i]; + } + return s; + } + + const char* MirrorQuality::toString(int i, Value& v) { + static const char* str[] = {"NONE", "STATIC_ENV", "DYNAMIC_PLANAR", "DYNAMIC_ENV", "BEST", NULL}; + static const Value val[] = {NONE, STATIC_ENV, DYNAMIC_PLANAR, DYNAMIC_ENV, BEST}; + const char* s = str[i]; + if (s) { + v = val[i]; + } + return s; + } } // G3D |
