summaryrefslogtreecommitdiffstats
path: root/o3d/cg_to_glsl/convert.py
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/cg_to_glsl/convert.py')
-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()