diff --git a/rcbasic_build/rcbasic_build.layout b/rcbasic_build/rcbasic_build.layout index f98b87b..c73737d 100755 --- a/rcbasic_build/rcbasic_build.layout +++ b/rcbasic_build/rcbasic_build.layout @@ -1,40 +1,33 @@ - - - - - - + - - - - - - - - - - - + - + + + + + + + + + - + - + @@ -47,17 +40,24 @@ - + - + - + - + + + + + + + + + + + - - - diff --git a/rcbasic_runtime/rc_fx_materials.h b/rcbasic_runtime/rc_fx_materials.h index fa8d738..c1fb5d2 100755 --- a/rcbasic_runtime/rc_fx_materials.h +++ b/rcbasic_runtime/rc_fx_materials.h @@ -5,6 +5,7 @@ //don't forget to include the CShader source #include "CShader.h" #include "rc_fx_shaders.h" +#include "rc_stdlib.h" #define RC_FX_MATERIAL_BASE_INDEX 128 @@ -666,9 +667,12 @@ void rc_setMaterialConstant(int material_id, std::string m_constant, double n1, float m_constant_value[] = {n1, n2, n3, n4}; + m_constant = rc_intern_trim(rc_intern_lcase(m_constant)); + for(int i = 0; i < rc_material[material_id].shader->getUniformVariableCount(); i++) { std::string u_var(rc_material[material_id].shader->getUniformVariable(i)->name.c_str()); + u_var = rc_intern_trim(rc_intern_lcase(u_var)); if(u_var.compare(m_constant)==0) { rc_material[material_id].shader->getUniformVariable(i)->value = m_constant_value; @@ -690,9 +694,12 @@ void rc_getMaterialConstant(int material_id, std::string m_constant, double* n1, *n3 = 0; *n4 = 0; + m_constant = rc_intern_trim(rc_intern_lcase(m_constant)); + for(int i = 0; i < rc_material[material_id].shader->getUniformVariableCount(); i++) { std::string u_var(rc_material[material_id].shader->getUniformVariable(i)->name.c_str()); + u_var = rc_intern_trim(rc_intern_lcase(u_var)); if(u_var.compare(m_constant)==0) { switch(rc_material[material_id].shader->getUniformVariable(i)->type) diff --git a/rcbasic_runtime/rcbasic_runtime.depend b/rcbasic_runtime/rcbasic_runtime.depend index f141801..4c13ba6 100755 --- a/rcbasic_runtime/rcbasic_runtime.depend +++ b/rcbasic_runtime/rcbasic_runtime.depend @@ -2559,10 +2559,11 @@ -1755127114 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_fx_materials.h +1755137987 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/rc_fx_materials.h "CShader.h" "rc_fx_shaders.h" + "rc_stdlib.h" 1748042868 /home/n00b/Projects/RCBASIC4/rcbasic_runtime/CShader.h diff --git a/rcbasic_runtime/rcbasic_runtime.layout b/rcbasic_runtime/rcbasic_runtime.layout index ce5ab0b..09883fd 100755 --- a/rcbasic_runtime/rcbasic_runtime.layout +++ b/rcbasic_runtime/rcbasic_runtime.layout @@ -2,114 +2,19 @@ - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -117,59 +22,9 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -177,39 +32,19 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - + @@ -217,9 +52,84 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -232,34 +142,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + +