summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 19:05:53 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-22 19:05:53 +0000
commit3665388ed2aca75356312e8155a8311a2b543a5f (patch)
tree7b09201b697e2f699b0cf6579bab8567fe240812
parent47234656da19f4ac79c391d6c17f54fef8f50feb (diff)
downloadchromium_src-3665388ed2aca75356312e8155a8311a2b543a5f.zip
chromium_src-3665388ed2aca75356312e8155a8311a2b543a5f.tar.gz
chromium_src-3665388ed2aca75356312e8155a8311a2b543a5f.tar.bz2
Simplification of recent change suggested by amarinichev.
BUG=none TEST=reran against teapot shader Review URL: http://codereview.chromium.org/1705006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45337 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xo3d/cg_to_glsl/convert.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/o3d/cg_to_glsl/convert.py b/o3d/cg_to_glsl/convert.py
index 5e746c6..566b0fc 100755
--- a/o3d/cg_to_glsl/convert.py
+++ b/o3d/cg_to_glsl/convert.py
@@ -63,12 +63,12 @@ MATRIX_UNIFORM_NAMES = [
'worldViewProjectionInverseTranspose'
]
+MATRIX_UNIFORM_NAMES_MAPPING = dict((name.lower(), name)
+ for name in MATRIX_UNIFORM_NAMES)
+
def correct_semantic_case(name):
lower_name = name.lower()
- for current_name in MATRIX_UNIFORM_NAMES:
- if lower_name == current_name.lower():
- return current_name
- return lower_name
+ return MATRIX_UNIFORM_NAMES_MAPPING.get(lower_name, lower_name)
def get_input_mapping(header):
ret = dict()