When using matrix shared parameters, it falls into this piece of code:
Code: Select all
else if(val.find("matrix") != String::npos)
{
int count1, count2;
if (val.size() == 9)
{
count1 = StringConverter::parseInt(val.substr(6, 1));
count2 = StringConverter::parseInt(val.substr(8, 1));
}
else
return false;
if (count1 > 4 || count1 < 2 || count2 > 4 || count2 < 2)
return false;
switch(count1)
{
case 2:
*op = (GpuConstantType)(GCT_MATRIX_2X2 + count2 - 1);
break;
case 3:
*op = (GpuConstantType)(GCT_MATRIX_3X2 + count2 - 1);
break;
case 4:
*op = (GpuConstantType)(GCT_MATRIX_4X2 + count2 - 1);
break;
}
}
I don't know it it has been resolved in current developpement version of Ogre, but currently it results of a bad estimation of the size of the parameter and a crash when setting a value to the parameter.
I created a report in the bugtracker.