gdritter repos chenoska / 4fa8aa1
Delete and suppress warnings Getty Ritter 6 years ago
2 changed file(s) with 3 addition(s) and 17 deletion(s). Collapse all Expand all
1 #![allow(dead_code)]
2
13 pub struct Tile {
24 sprite: (u8, u8),
35 }
1414 pub use graphics::*;
1515 }
1616
17 #[allow(dead_code)]
1718 struct Vertex {
1819 x: gl::GLfloat,
1920 y: gl::GLfloat,
2122 v: gl::GLfloat,
2223 }
2324
24 impl Vertex {
25 fn new(
26 x: gl::GLfloat,
27 y: gl::GLfloat,
28 u: gl::GLfloat,
29 v: gl::GLfloat,
30 ) -> Vertex {
31 Vertex { x, y, u, v }
32 }
33 }
34
3525 static TILE_DATA: [Vertex; 4] = [
3626 Vertex { x: 0.5, y: -0.5, u: 1.0, v: 0.0 },
3727 Vertex { x: -0.5, y: -0.5, u: 0.0, v: 0.0 },
3828 Vertex { x: 0.5, y: 0.5, u: 1.0, v: 1.0 },
3929 Vertex { x: -0.5, y: 0.5, u: 0.0, v: 1.0 },
40 ];
41
42 static VERTEX_DATA: [Vertex; 3] = [
43 Vertex { x: 0.0, y: 0.5, u: 0.0, v: 0.0 },
44 Vertex { x: 0.5, y: -0.5, u: 0.0, v: 0.0 },
45 Vertex { x: -0.5, y: -0.5, u: 0.0, v: 0.0 },
4630 ];
4731
4832 // Shader sources