[Viewer3D] MediaLoader: Bind fixedPointSize for the SfMLoader

The `fixedPointSize` parameter was used to determine whether the
point size was fixed or programmable from the QML (using a `PointSize`
render state). With Qt6, this render state is not correctly handled by
the RHI and we need to set directly within the shader whether the point
size is fixed or not, hence the binding.
This commit is contained in:
Candice Bentéjac 2024-12-17 19:05:03 +01:00
parent 9aa9e7fe6e
commit e3f1e27c68

View file

@ -108,6 +108,7 @@ import Utils 1.0
Component.onCompleted: {
var obj = Viewer3DSettings.sfmDataLoaderComp.createObject(sfmDataLoaderEntity, {
"source": source,
"fixedPointSize": Qt.binding(function() { return Viewer3DSettings.fixedPointSize }),
"pointSize": Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }),
"locatorScale": Qt.binding(function() { return Viewer3DSettings.cameraScale }),
"cameraPickingEnabled": Qt.binding(function() { return root.enabled && root.cameraPickingEnabled }),