Skip to content

Instantly share code, notes, and snippets.

@viperscape viperscape/render.rs
Created Dec 31, 2015

Embed
What would you like to do?
// .. //
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
You can’t perform that action at this time.