OpenGL: Readable name fixes
Jeffrey Pfau jeffrey@endrift.com
Thu, 19 Nov 2015 23:49:50 -0800
2 files changed,
4 insertions(+),
1 deletions(-)
M
res/shaders/ags001.shader/manifest.ini
→
res/shaders/ags001.shader/manifest.ini
@@ -19,14 +19,17 @@ [uniform.lightBrightness]
type=float default=1 pass[0]=false +readableName=Light brightness [uniform.reflectionBrightness] type=float default=0.07 pass[0]=false +readableName=Reflection brightness [uniform.reflectionDistance] type=float2 default[0]=0 default[1]=0.025 pass[0]=false +readableName=Reflection distance
M
src/platform/opengl/gles2.c
→
src/platform/opengl/gles2.c
@@ -683,13 +683,13 @@ }
_loadValue(description, uniform->name, uniform->type, "default", &uniform->value); _loadValue(description, uniform->name, uniform->type, "min", &uniform->min); _loadValue(description, uniform->name, uniform->type, "max", &uniform->max); - uniform->name = strdup(uniform->name + strlen("uniform.")); const char* readable = ConfigurationGetValue(description, uniform->name, "readableName"); if (readable) { uniform->readableName = strdup(readable); } else { uniform->readableName = 0; } + uniform->name = strdup(uniform->name + strlen("uniform.")); return true; }