forked from qt-creator/qt-creator
QmlDesigner: Fix issues related to uniforms
Some types were parsed wrong for shader values Change-Id: I4301d671dfa7bde1f23feacd64ceb5f0f9d247b9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -230,7 +230,7 @@ const QString EffectMakerModel::getBufUniform()
|
||||
for (const auto uniform : uniforms) {
|
||||
// TODO: Check if uniform is already added.
|
||||
if (uniform->type() != Uniform::Type::Sampler && uniform->type() != Uniform::Type::Define) {
|
||||
QString type = Uniform::stringFromType(uniform->type());
|
||||
QString type = Uniform::stringFromType(uniform->type(), true);
|
||||
QString props = " " + type + " " + uniform->name() + ";\n";
|
||||
s += props;
|
||||
}
|
||||
@@ -480,7 +480,7 @@ const QString EffectMakerModel::getConstVariables()
|
||||
for (Uniform *uniform : uniforms) {
|
||||
// TODO: Check if uniform is already added.
|
||||
QString constValue = valueAsVariable(*uniform);
|
||||
QString type = Uniform::stringFromType(uniform->type());
|
||||
QString type = Uniform::stringFromType(uniform->type(), true);
|
||||
s += QString("const %1 %2 = %3;\n").arg(type, uniform->name(), constValue);
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user