Skip to content

Commit e216a87

Browse files
authored
Merge pull request glium#1810 from adamnemecek/master
trimmed whitespace
2 parents c2a2575 + 82c1da3 commit e216a87

File tree

20 files changed

+43
-43
lines changed

20 files changed

+43
-43
lines changed

examples/displacement_mapping.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn main() {
3131

3232
implement_vertex!(Vertex, position, tex_coords);
3333

34-
glium::VertexBuffer::new(&display,
34+
glium::VertexBuffer::new(&display,
3535
&[
3636
Vertex { position: [-0.5, 0.5, 3.0], tex_coords: [1.0, 1.0] },
3737
Vertex { position: [ 0.5, 0.5, 3.0], tex_coords: [0.0, 1.0] },
@@ -118,7 +118,7 @@ fn main() {
118118
vec3 normal = normalize(gl_TessCoord.x * tc_normal[0] +
119119
gl_TessCoord.y * tc_normal[1] +
120120
gl_TessCoord.z * tc_normal[2]);
121-
121+
122122
vec2 tex_coords = gl_TessCoord.x * tc_tex_coords[0] +
123123
gl_TessCoord.y * tc_tex_coords[1] +
124124
gl_TessCoord.z * tc_tex_coords[2];

examples/fxaa.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ mod fxaa {
8080
#define FXAA_SPAN_MAX 8.0
8181
8282
vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 resolution,
83-
vec2 v_rgbNW, vec2 v_rgbNE,
84-
vec2 v_rgbSW, vec2 v_rgbSE,
83+
vec2 v_rgbNW, vec2 v_rgbNE,
84+
vec2 v_rgbSW, vec2 v_rgbSE,
8585
vec2 v_rgbM) {
8686
vec4 color;
8787
mediump vec2 inverseVP = vec2(1.0 / resolution.x, 1.0 / resolution.y);
@@ -99,19 +99,19 @@ mod fxaa {
9999
float lumaM = dot(rgbM, luma);
100100
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
101101
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
102-
102+
103103
mediump vec2 dir;
104104
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
105105
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
106-
106+
107107
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *
108108
(0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
109-
109+
110110
float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
111111
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
112112
max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
113113
dir * rcpDirMin)) * inverseVP;
114-
114+
115115
vec3 rgbA = 0.5 * (
116116
texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +
117117
texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);
@@ -128,7 +128,7 @@ mod fxaa {
128128
}
129129
130130
void main() {
131-
vec2 fragCoord = v_tex_coords * resolution;
131+
vec2 fragCoord = v_tex_coords * resolution;
132132
vec4 color;
133133
if (enabled != 0) {
134134
vec2 inverseVP = 1.0 / resolution.xy;
@@ -206,7 +206,7 @@ mod fxaa {
206206
enabled: if enabled { 1i32 } else { 0i32 },
207207
resolution: (target_dimensions.0 as f32, target_dimensions.1 as f32)
208208
};
209-
209+
210210
target.draw(&system.vertex_buffer, &system.index_buffer, &system.program, &uniforms,
211211
&Default::default()).unwrap();
212212

@@ -341,7 +341,7 @@ fn main() {
341341
let mut camera = support::camera::CameraState::new();
342342
let fxaa = fxaa::FxaaSystem::new(&display);
343343
let mut fxaa_enabled = true;
344-
344+
345345
// the main loop
346346
support::start_loop(event_loop, move |events| {
347347
camera.update();

examples/image.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn main() {
3434

3535
implement_vertex!(Vertex, position, tex_coords);
3636

37-
glium::VertexBuffer::new(&display,
37+
glium::VertexBuffer::new(&display,
3838
&[
3939
Vertex { position: [-1.0, -1.0], tex_coords: [0.0, 0.0] },
4040
Vertex { position: [-1.0, 1.0], tex_coords: [0.0, 1.0] },
@@ -79,7 +79,7 @@ fn main() {
7979
"
8080
},
8181

82-
110 => {
82+
110 => {
8383
vertex: "
8484
#version 110
8585
@@ -107,7 +107,7 @@ fn main() {
107107
",
108108
},
109109

110-
100 => {
110+
100 => {
111111
vertex: "
112112
#version 100
113113
@@ -135,7 +135,7 @@ fn main() {
135135
",
136136
},
137137
).unwrap();
138-
138+
139139
// the main loop
140140
support::start_loop(event_loop, move |events| {
141141
// building the uniforms

examples/info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn main() {
4545
} else {
4646
"none"
4747
});
48-
48+
4949
println!("{} context renderer: {}", api, display.get_opengl_renderer_string());
5050
println!("{} context vendor: {}", api, display.get_opengl_vendor_string());
5151
}

examples/instancing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn main() {
8888
.unwrap();
8989

9090
let camera = support::camera::CameraState::new();
91-
91+
9292
// the main loop
9393
support::start_loop(event_loop, move |events| {
9494
// updating the teapots

examples/picking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ fn main() {
236236
glutin::event::WindowEvent::CloseRequested => action = support::Action::Stop,
237237
glutin::event::WindowEvent::CursorMoved { position, .. } => {
238238
let hidpi_factor = display.gl_window().window().hidpi_factor();
239-
cursor_position = Some(position.to_physical(hidpi_factor).into());
239+
cursor_position = Some(position.to_physical(hidpi_factor).into());
240240
}
241241
ev => camera.process_input(&ev),
242242
},

examples/screenshot.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323

2424
implement_vertex!(Vertex, position, color);
2525

26-
glium::VertexBuffer::new(&display,
26+
glium::VertexBuffer::new(&display,
2727
&[
2828
Vertex { position: [-0.5, -0.5], color: [0.0, 1.0, 0.0] },
2929
Vertex { position: [ 0.0, 0.5], color: [0.0, 0.0, 1.0] },
@@ -66,7 +66,7 @@ fn main() {
6666
"
6767
},
6868

69-
110 => {
69+
110 => {
7070
vertex: "
7171
#version 110
7272

examples/teapot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn main() {
124124

125125
//
126126
let mut camera = support::camera::CameraState::new();
127-
127+
128128
// the main loop
129129
support::start_loop(event_loop, move |events| {
130130
camera.update();

examples/tessellation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323

2424
implement_vertex!(Vertex, position);
2525

26-
glium::VertexBuffer::new(&display,
26+
glium::VertexBuffer::new(&display,
2727
&[
2828
Vertex { position: [-0.5, -0.5] },
2929
Vertex { position: [ 0.0, 0.5] },
@@ -127,7 +127,7 @@ fn main() {
127127
// level of tessellation
128128
let mut tess_level: i32 = 5;
129129
println!("The current tessellation level is {} ; use the Up and Down keys to change it", tess_level);
130-
130+
131131
// the main loop
132132
support::start_loop(event_loop, move |events| {
133133
// building the uniforms

examples/tutorial-12.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn main() {
5454

5555
let program = glium::Program::from_source(&display, vertex_shader_src, fragment_shader_src,
5656
None).unwrap();
57-
57+
5858
event_loop.run(move |event, _, control_flow| {
5959
let next_frame_time = std::time::Instant::now() +
6060
std::time::Duration::from_nanos(16_666_667);

0 commit comments

Comments
 (0)