Skip to content

Commit 3c4dc0a

Browse files
committed
Update 001-triangle-arrays1.rs
1 parent b4e902b commit 3c4dc0a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

examples/001-triangle-arrays1.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,19 @@ const VERTICES: [Vertex; 3] =
1919
[[-0.5, -0.5, 0.0], [0.5, -0.5, 0.0], [0.0, 0.5, 0.0]];
2020

2121
const VERT_SHADER: &str = r#"#version 330 core
22+
layout (location = 0) in vec3 pos;
2223
23-
layout (location = 0) in vec3 pos;
24-
25-
void main() {
26-
gl_Position = vec4(pos.x, pos.y, pos.z, 1.0);
27-
}
24+
void main() {
25+
gl_Position = vec4(pos.x, pos.y, pos.z, 1.0);
26+
}
2827
"#;
2928

3029
const FRAG_SHADER: &str = r#"#version 330 core
31-
out vec4 final_color;
30+
out vec4 final_color;
3231
33-
void main() {
34-
final_color = vec4(1.0, 0.5, 0.2, 1.0);
35-
}
32+
void main() {
33+
final_color = vec4(1.0, 0.5, 0.2, 1.0);
34+
}
3635
"#;
3736

3837
fn main() {

0 commit comments

Comments
 (0)