mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Preventing display glitch from invalid scaling of view
This commit is contained in:
@@ -144,6 +144,11 @@ void GeometryView::update(float dt)
|
|||||||
}
|
}
|
||||||
output_surface_->setTextureIndex( output->texture() );
|
output_surface_->setTextureIndex( output->texture() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prevent invalid scaling
|
||||||
|
float s = CLAMP(scene.root()->scale_.x, GEOMETRY_MIN_SCALE, GEOMETRY_MAX_SCALE);
|
||||||
|
scene.root()->scale_.x = s;
|
||||||
|
scene.root()->scale_.y = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// the current view is the geometry view
|
// the current view is the geometry view
|
||||||
|
|||||||
@@ -169,6 +169,11 @@ void LayerView::update(float dt)
|
|||||||
persp_left_->translation_.x = -aspect_ratio;
|
persp_left_->translation_.x = -aspect_ratio;
|
||||||
persp_right_->translation_.x = aspect_ratio + 0.06;
|
persp_right_->translation_.x = aspect_ratio + 0.06;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prevent invalid scaling
|
||||||
|
float s = CLAMP(scene.root()->scale_.x, LAYER_MIN_SCALE, LAYER_MAX_SCALE);
|
||||||
|
scene.root()->scale_.x = s;
|
||||||
|
scene.root()->scale_.y = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Mixer::manager().view() == this )
|
if (Mixer::manager().view() == this )
|
||||||
|
|||||||
@@ -280,6 +280,10 @@ void MixingView::update(float dt)
|
|||||||
f = 1.f - f;
|
f = 1.f - f;
|
||||||
mixingCircle_->shader()->color = glm::vec4(f, f, f, 1.f);
|
mixingCircle_->shader()->color = glm::vec4(f, f, f, 1.f);
|
||||||
|
|
||||||
|
// prevent invalid scaling
|
||||||
|
float s = CLAMP(scene.root()->scale_.x, MIXING_MIN_SCALE, MIXING_MAX_SCALE);
|
||||||
|
scene.root()->scale_.x = s;
|
||||||
|
scene.root()->scale_.y = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// the current view is the mixing view
|
// the current view is the mixing view
|
||||||
|
|||||||
Reference in New Issue
Block a user