#include <dali-scene3d/internal/model-components/model-primitive-impl.h>
// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/image-loading.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/devel-api/adaptor-framework/image-loading.h>
// INTERNAL INCLUDES
#include <dali-scene3d/internal/model-components/material-impl.h>
void ModelPrimitive::SetBlendShapeData(Scene3D::Loader::BlendShapes::BlendShapeData& data)
{
mBlendShapeData = std::move(data);
- Scene3D::Loader::BlendShapes::ConfigureProperties(mBlendShapeData, mShader);
+ Scene3D::Loader::BlendShapes::ConfigureProperties(mBlendShapeData, mRenderer);
}
void ModelPrimitive::SetBlendShapeGeometry(Dali::Texture blendShapeGeometry)
mShader = Shader::New(vertexShader, fragmentShader);
if(mBlendShapeData.version != Scene3D::Loader::BlendShapes::Version::INVALID && mBlendShapeData.mActor.GetHandle())
{
- Scene3D::Loader::BlendShapes::ConfigureProperties(mBlendShapeData, mShader);
+ Scene3D::Loader::BlendShapes::ConfigureProperties(mBlendShapeData, mRenderer);
}
if(!mRenderer)
mRenderer.SetTextures(newTextures);
}
- mRenderer.RegisterProperty(GetImplementation(mMaterial).GetImageBasedLightScaleFactorName() .data(), mIblScaleFactor);
+ mRenderer.RegisterProperty(GetImplementation(mMaterial).GetImageBasedLightScaleFactorName().data(), mIblScaleFactor);
mRenderer.RegisterProperty(GetImplementation(mMaterial).GetImageBasedLightMaxLodUniformName().data(), static_cast<float>(mSpecularMipmapLevels));
}
}
const char* BlendShapes::WEIGHTS_UNIFORM("uBlendShapeWeight");
-void BlendShapes::ConfigureProperties(const BlendShapeData& data, Shader shader)
+void BlendShapes::ConfigureProperties(const BlendShapeData& data, Renderer renderer)
{
unsigned int index = 0u;
actor.RegisterProperty(weightName, weight);
}
- if(shader && data.version == Version::VERSION_1_0)
+ if(renderer && data.version == Version::VERSION_1_0)
{
snprintf(pFactorName, sizeof(unnormalizeFactorNameBuffer) - (pFactorName - unnormalizeFactorNameBuffer), "[%d]", index);
std::string factorName{unnormalizeFactorNameBuffer};
- shader.RegisterProperty(factorName, data.unnormalizeFactors[index]);
+ renderer.RegisterProperty(factorName, data.unnormalizeFactors[index]);
}
++index;
}
- if(shader)
+ if(renderer)
{
if(Version::VERSION_2_0 == data.version)
{
- shader.RegisterProperty(UNNORMALIZE_FACTOR, data.unnormalizeFactors[0u]);
+ renderer.RegisterProperty(UNNORMALIZE_FACTOR, data.unnormalizeFactors[0u]);
}
- shader.RegisterProperty(NUMBER_OF_BLEND_SHAPES, Property::Value(static_cast<float>(index)));
- shader.RegisterProperty(COMPONENT_SIZE, Property::Value(static_cast<float>(data.bufferOffset)));
+ renderer.RegisterProperty(NUMBER_OF_BLEND_SHAPES, Property::Value(static_cast<float>(index)));
+ renderer.RegisterProperty(COMPONENT_SIZE, Property::Value(static_cast<float>(data.bufferOffset)));
// Create a read only property to preserve the components of the blend shape.
- shader.RegisterProperty(COMPONENTS, data.components, Property::AccessMode::READ_ONLY);
+ renderer.RegisterProperty(COMPONENTS, data.components, Property::AccessMode::READ_ONLY);
}
}
/**
* @brief Registers properties based on the mesh definition (and geometry) and identified by the above string constants,
- * on the given @a shader and @a actor.
+ * on the given @a renderer and @a actor.
*/
- static void ConfigureProperties(const BlendShapeData& data, Shader shader);
+ static void ConfigureProperties(const BlendShapeData& data, Renderer renderer);
BlendShapes() = delete;
};