[oden] Texture coordinates go the right way
This commit is contained in:
parent
0a36ffdde1
commit
17e40c2a36
1 changed files with 14 additions and 14 deletions
28
src/lib.rs
28
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],
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue