Skip to content

Commit

Permalink
Merge #1444
Browse files Browse the repository at this point in the history
1444: Fix shader versions to work on macOS r=kvark a=grtlr

The shader versions were changed in #1417.
  • Loading branch information
bors[bot] committed Aug 24, 2017
2 parents cdad9de + b9820e3 commit 77bfa64
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions examples/render/triangle/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ pub fn main() {
let views = swap_chain.create_color_views(&mut device);

let pso = device.create_pipeline_simple(
include_bytes!("shader/triangle_120.glslv"),
include_bytes!("shader/triangle_120.glslf"),
include_bytes!("shader/triangle_150.glslv"),
include_bytes!("shader/triangle_150.glslf"),
pipe::new()
).unwrap();
let (vertex_buffer, slice) = device.create_vertex_buffer_with_slice(&TRIANGLE, ());
Expand Down
7 changes: 0 additions & 7 deletions examples/render/triangle/shader/triangle_120.glslf

This file was deleted.

8 changes: 8 additions & 0 deletions examples/render/triangle/shader/triangle_150.glslf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#version 150 core

in vec4 v_Color;
out vec4 Target0;

void main() {
Target0 = v_Color;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#version 120
#version 150 core

attribute vec2 a_Pos;
attribute vec3 a_Color;
varying vec4 v_Color;
in vec2 a_Pos;
in vec3 a_Color;
out vec4 v_Color;

void main() {
v_Color = vec4(a_Color, 1.0);
gl_Position = vec4(a_Pos, 0.0, 1.0);
}
}

0 comments on commit 77bfa64

Please sign in to comment.