mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:23:17 +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;
|
||||
_isUVModeStretch = isUVModeStretch;
|
||||
|
||||
bool geometryChanged = uvModeStretchChanged || pointsChanged || widthsChanged || normalsChanged || colorsChanged || textureChanged || faceCameraChanged;
|
||||
|
||||
void* key = (void*)this;
|
||||
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [=]() {
|
||||
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [this, geometryChanged] () {
|
||||
withWriteLock([&] {
|
||||
updateModelTransformAndBound();
|
||||
_renderTransform = getModelTransform();
|
||||
|
||||
if (uvModeStretchChanged || pointsChanged || widthsChanged || normalsChanged || colorsChanged || textureChanged || faceCameraChanged) {
|
||||
if (geometryChanged) {
|
||||
updateGeometry();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue