diff --git a/src/lib.rs b/src/lib.rs index e432dfef..c0e5aa6a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -404,27 +404,27 @@ impl State { GraphicsCommand::Sprite(sc) => { vertices.push(Vertex { position: [sc.x, sc.y, 0.0], + tex_coords: [sc.u, sc.v + sc.sh], + }); + vertices.push(Vertex { + position: [sc.x + sc.w, sc.y, 0.0], + tex_coords: [sc.u + sc.sw, sc.v + sc.sh], + }); + vertices.push(Vertex { + position: [sc.x, sc.y + sc.h, 0.0], + tex_coords: [sc.u, sc.v], + }); + vertices.push(Vertex { + position: [sc.x, sc.y + sc.h, 0.0], tex_coords: [sc.u, sc.v], }); vertices.push(Vertex { position: [sc.x + sc.w, sc.y, 0.0], - tex_coords: [sc.u + sc.sw, sc.v], - }); - vertices.push(Vertex { - position: [sc.x, sc.y + sc.h, 0.0], - tex_coords: [sc.u, sc.v + sc.sh], - }); - vertices.push(Vertex { - position: [sc.x, sc.y + sc.h, 0.0], - tex_coords: [sc.u, sc.v + sc.sh], - }); - vertices.push(Vertex { - position: [sc.x + sc.w, sc.y, 0.0], - tex_coords: [sc.u + sc.sw, sc.v], + tex_coords: [sc.u + sc.sw, sc.v + sc.sh], }); vertices.push(Vertex { position: [sc.x + sc.w, sc.y + sc.h, 0.0], - tex_coords: [sc.u + sc.sw, sc.v + sc.sh], + tex_coords: [sc.u + sc.sw, sc.v], }); }