Rename global_scale to scale in wgpu::image

This commit is contained in:
Héctor Ramón Jiménez 2024-05-02 15:28:46 +02:00
parent a57313b23e
commit 610394b695
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -212,10 +212,9 @@ impl Pipeline {
belt: &mut wgpu::util::StagingBelt, belt: &mut wgpu::util::StagingBelt,
images: &Batch, images: &Batch,
transformation: Transformation, transformation: Transformation,
global_scale: f32, scale: f32,
) { ) {
let transformation = let transformation = transformation * Transformation::scale(scale);
transformation * Transformation::scale(global_scale);
let nearest_instances: &mut Vec<Instance> = &mut Vec::new(); let nearest_instances: &mut Vec<Instance> = &mut Vec::new();
let linear_instances: &mut Vec<Instance> = &mut Vec::new(); let linear_instances: &mut Vec<Instance> = &mut Vec::new();
@ -263,12 +262,7 @@ impl Pipeline {
let size = [bounds.width, bounds.height]; let size = [bounds.width, bounds.height];
if let Some(atlas_entry) = cache.upload_vector( if let Some(atlas_entry) = cache.upload_vector(
device, device, encoder, handle, *color, size, scale,
encoder,
handle,
*color,
size,
global_scale,
) { ) {
add_instances( add_instances(
[bounds.x, bounds.y], [bounds.x, bounds.y],