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
use ImageSize;
use draw_state::DrawState;
pub trait Graphics {
type Texture: ImageSize;
fn clear_color(&mut self, color: [f32; 4]);
fn clear_stencil(&mut self, value: u8);
fn tri_list<F>(&mut self, draw_state: &DrawState, color: &[f32; 4], f: F)
where F: FnMut(&mut FnMut(&[f32]));
fn tri_list_uv<F>(
&mut self,
draw_state: &DrawState,
color: &[f32; 4],
texture: &<Self as Graphics>::Texture,
f: F
) where F: FnMut(&mut FnMut(&[f32], &[f32]));
}