diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-22 19:05:53 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-22 19:05:53 +0000 |
commit | 3665388ed2aca75356312e8155a8311a2b543a5f (patch) | |
tree | 7b09201b697e2f699b0cf6579bab8567fe240812 | |
parent | 47234656da19f4ac79c391d6c17f54fef8f50feb (diff) | |
download | chromium_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-x | o3d/cg_to_glsl/convert.py | 8 |
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() |