forked from qt-creator/qt-creator
QmlDesigner: Add missing camera plane ring to point light model
Task-number: QDS-2037 Change-Id: Ica5a7ec2983da251d2ab75565120423288de27a2 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -115,6 +115,9 @@ void LightGeometry::fillVertexData(QByteArray &vertexData, QByteArray &indexData
|
||||
} else if (m_lightType == LightType::Spot) {
|
||||
vertexSize = int(sizeof(float)) * 3 * (segments + 1);
|
||||
indexSize = int(sizeof(quint16)) * (segments + dirLines) * 2;
|
||||
} else if (m_lightType == LightType::Circle) {
|
||||
vertexSize = int(sizeof(float)) * 3 * segments;
|
||||
indexSize = int(sizeof(quint16)) * segments * 2;
|
||||
}
|
||||
vertexData.resize(vertexSize);
|
||||
indexData.resize(indexSize);
|
||||
@@ -173,6 +176,8 @@ void LightGeometry::fillVertexData(QByteArray &vertexData, QByteArray &indexData
|
||||
*indexPtr++ = tipIndex;
|
||||
*indexPtr++ = i * arc;
|
||||
}
|
||||
} else if (m_lightType == LightType::Circle) {
|
||||
createCircle(0, 0.f, 0, 1, 2);
|
||||
}
|
||||
|
||||
static const float floatMin = std::numeric_limits<float>::lowest();
|
||||
|
||||
@@ -43,7 +43,8 @@ public:
|
||||
Spot,
|
||||
Area,
|
||||
Directional,
|
||||
Point
|
||||
Point,
|
||||
Circle // Not a light type, but an auxiliary mesh for point light
|
||||
};
|
||||
Q_ENUM(LightType)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user