From 5e8277e923c5545a15bae7c740ab6afaa597a59f Mon Sep 17 00:00:00 2001 From: jackpoz Date: Fri, 22 Aug 2014 16:58:23 +0200 Subject: Core/Dependencies: Update G3D to v9.0 r4036 --- dep/g3dlite/source/constants.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'dep/g3dlite/source/constants.cpp') 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 -- cgit v1.2.3