Fixed lint issues & cleaned up some documentation.
This commit is contained in:
parent
1eb8d972ba
commit
cb7c467654
24 changed files with 33 additions and 40 deletions
|
|
@ -47,4 +47,4 @@ void main() {
|
|||
fragColor = color_stops[color_stops_size - 2];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ uniform vec4 color;
|
|||
|
||||
void main() {
|
||||
fragColor = color;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ out vec2 raw_position;
|
|||
void main() {
|
||||
gl_Position = u_Transform * vec4(i_Position, 0.0, 1.0);
|
||||
raw_position = i_Position;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//! Draw meshes of triangle.
|
||||
//! Draw meshes of triangles.
|
||||
mod gradient;
|
||||
mod solid;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pub struct SolidProgram {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct SolidUniformData {
|
||||
struct SolidUniformData {
|
||||
pub color: Color,
|
||||
pub color_location: <Context as HasContext>::UniformLocation,
|
||||
pub transform: Transformation,
|
||||
|
|
@ -74,10 +74,10 @@ impl SolidProgram {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn use_program(&mut self, gl: &glow::Context, color: &Color, transform: &Transformation) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue