1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use gfx; use gfx::preset::blend::ALPHA as ALPHA_PRESET; use gfx::state::ColorMask; pub type ColorFormat = gfx::format::Srgba8; pub type DepthFormat = gfx::format::DepthStencil; gfx_defines! { vertex Vertex { position: [f32; 3] = "a_position", color: [f32; 3] = "a_color", } constant Transform { combined: [[f32; 4]; 4] = "u_combined", } pipeline pipe { vbuf: gfx::VertexBuffer<Vertex> = (), transform: gfx::ConstantBuffer<Transform> = "Transform", out: gfx::RenderTarget<ColorFormat> = "f_color", } }