summaryrefslogtreecommitdiffstats
path: root/glow/src/triangle/solid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'glow/src/triangle/solid.rs')
-rw-r--r--glow/src/triangle/solid.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/glow/src/triangle/solid.rs b/glow/src/triangle/solid.rs
index 3d4d1968..5ba7f91c 100644
--- a/glow/src/triangle/solid.rs
+++ b/glow/src/triangle/solid.rs
@@ -25,12 +25,12 @@ impl SolidUniformData {
color_location: unsafe {
gl.get_uniform_location(program, "color")
}
- .expect("Solid - Color uniform location."),
+ .expect("Solid - Get color."),
transform: Transformation::identity(),
transform_location: unsafe {
gl.get_uniform_location(program, "u_Transform")
}
- .expect("Get transform location."),
+ .expect("Solid - Get u_Transform."),
}
}
}
@@ -74,10 +74,13 @@ impl SolidProgram {
}
}
- pub fn use_program(&mut self, gl: &Context, color: &Color, transform: &Transformation) {
- unsafe {
- gl.use_program(Some(self.program))
- }
+ pub fn use_program(
+ &mut self,
+ gl: &Context,
+ color: &Color,
+ transform: &Transformation,
+ ) {
+ unsafe { gl.use_program(Some(self.program)) }
self.write_uniforms(gl, color, transform)
}
}