mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
reduce lambda copies
This commit is contained in:
parent
7a5bbb8f6f
commit
61b7b8b669
1 changed files with 4 additions and 2 deletions
|
@ -167,14 +167,16 @@ void PolyLineEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer&
|
||||||
|
|
||||||
bool uvModeStretchChanged = _isUVModeStretch != isUVModeStretch;
|
bool uvModeStretchChanged = _isUVModeStretch != isUVModeStretch;
|
||||||
_isUVModeStretch = isUVModeStretch;
|
_isUVModeStretch = isUVModeStretch;
|
||||||
|
|
||||||
|
bool geometryChanged = uvModeStretchChanged || pointsChanged || widthsChanged || normalsChanged || colorsChanged || textureChanged || faceCameraChanged;
|
||||||
|
|
||||||
void* key = (void*)this;
|
void* key = (void*)this;
|
||||||
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [=]() {
|
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [this, geometryChanged] () {
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
updateModelTransformAndBound();
|
updateModelTransformAndBound();
|
||||||
_renderTransform = getModelTransform();
|
_renderTransform = getModelTransform();
|
||||||
|
|
||||||
if (uvModeStretchChanged || pointsChanged || widthsChanged || normalsChanged || colorsChanged || textureChanged || faceCameraChanged) {
|
if (geometryChanged) {
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue