1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use glium;
use glium::uniforms::Uniforms;
use shaders::ShaderInfo;
use shapes::{Shape, IndexType};
pub struct Mould<U: Uniforms, S: Shape> {
shape: S,
shader: ShaderInfo<U>,
}
impl<U: Uniforms, S: Shape> Mould<U, S> {
pub fn new(shape: S, shader: ShaderInfo<U>) -> Self {
Mould {
shape: shape,
shader: shader,
}
}
pub fn get_shape(&self) -> &S {
&self.shape
}
pub fn get_shader(&self) -> &ShaderInfo<U> {
&self.shader
}
pub fn set(&mut self, uniforms: U) {
self.shader.set(uniforms)
}
}