diff options
Diffstat (limited to 'examples/render-quad/src')
-rw-r--r-- | examples/render-quad/src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/render-quad/src/main.rs b/examples/render-quad/src/main.rs index d0993ea..9cc7310 100644 --- a/examples/render-quad/src/main.rs +++ b/examples/render-quad/src/main.rs @@ -41,10 +41,10 @@ fn main() { let window = WindowBuilder::new().build(&event_loop).unwrap(); let mut ctx = RenderingContext::new(&window).unwrap(); - ctx.vert_buffer[0] = UVPoint(Vector2::new(-0.5, -0.5), Vector3::new(1.0, 0.0, 0.0)); - ctx.vert_buffer[1] = UVPoint(Vector2::new(0.5, -0.5), Vector3::new(0.0, 1.0, 0.0)); - ctx.vert_buffer[2] = UVPoint(Vector2::new(0.5, 0.5), Vector3::new(0.0, 0.0, 1.0)); - ctx.vert_buffer[3] = UVPoint(Vector2::new(-0.5, 0.5), Vector3::new(1.0, 0.0, 1.0)); + ctx.vert_buffer[0] = UVPoint(Vector2::new(-0.5, -0.5), Vector3::new(1.0, 0.0, 0.0), Vector2::new(0.0, 0.0)); + ctx.vert_buffer[1] = UVPoint(Vector2::new(0.5, -0.5), Vector3::new(0.0, 1.0, 0.0), Vector2::new(1.0, 0.0)); + ctx.vert_buffer[2] = UVPoint(Vector2::new(0.5, 0.5), Vector3::new(0.0, 0.0, 1.0), Vector2::new(1.0, 1.0)); + ctx.vert_buffer[3] = UVPoint(Vector2::new(-0.5, 0.5), Vector3::new(1.0, 0.0, 1.0), Vector2::new(0.0, 1.0)); ctx.index_buffer[0] = (0, 1, 2); ctx.index_buffer[1] = (0, 2, 3); @@ -72,7 +72,7 @@ fn main() { let mouse_x: f32 = ((position.x / win_size.width as f64) * 2.0 - 1.0) as f32; let mouse_y: f32 = ((position.y / win_size.height as f64) * 2.0 - 1.0) as f32; - ctx.vert_buffer[0] = UVPoint(Vector2::new(mouse_x, mouse_y), Vector3::new(1.0, 0.0, 0.0)); + ctx.vert_buffer[0] = UVPoint(Vector2::new(mouse_x, mouse_y), Vector3::new(1.0, 0.0, 0.0), Vector2::new(0.0, 0.0)); } Event::MainEventsCleared => { |