diff options
-rw-r--r-- | src/main.zig | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main.zig b/src/main.zig index 8b9f927..33e8aba 100644 --- a/src/main.zig +++ b/src/main.zig @@ -121,19 +121,22 @@ pub const Window = struct { /// OpenGl triangle shader program shader_prog: c_uint = undefined, /// Triangle vertices - vertices: [9]f32 = .{ + vertices: [12]f32 = .{ -0.5, -0.5, 0.0, // bl 0.5, -0.5, 0.0, // br - 0.0, 0.5, 0.0, // t + 0.5, 0.5, 0.0, // tr + -0.5, 0.5, 0.0, // tl }, - colors: [12]f32 = .{ + colors: [16]f32 = .{ 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, + 1.0, 1.0, 1.0, 1.0, }, /// Triangles indices - indices: [3]c_uint = .{ + indices: [6]c_uint = .{ 0, 1, 2, + 2, 3, 0, }, /// OpenGL vertex buffer object vbo: c_uint = undefined, |