Created
December 31, 2015 18:18
-
-
Save viperscape/35b6cb1a881c5684c569 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .. // | |
static VERT_SRC: &'static str = r" | |
#version 140 | |
in vec3 pos; | |
in vec3 norm; | |
uniform mat4 transform; | |
uniform vec3 size; | |
uniform vec3 color; | |
out vec3 v_color; | |
out vec3 v_position; | |
out vec3 v_normal; | |
void main() { | |
v_position = pos * size; | |
v_normal = norm; | |
gl_Position = transform * vec4(v_position, 1.0); | |
v_color = color; | |
} | |
"; | |
// .. // | |
pub fn draw( | |
&mut self, | |
size: Vec3<f32>, | |
color: color::Color, | |
transform: Mat4<f32>, | |
target: &mut glium::Frame, | |
) { | |
let uniforms = uniform! { | |
transform: *transform.as_ref(), | |
size: *size.as_ref(), | |
color: color, | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment