#![deny(missing_docs)]
#[macro_use]
extern crate log;
extern crate gfx;
extern crate draw_queue;
mod mem;
mod phase;
use std::fmt::Debug;
use std::hash::Hash;
pub use self::phase::{Object, sort, FlushError,
AbstractPhase, CachedPhase, Phase};
pub trait Material {}
pub trait ToDepth {
type Depth: Copy + Debug + PartialOrd;
fn to_depth(&self) -> Self::Depth;
}
pub type TechResult<'a, R, P> = (
&'a gfx::handle::Program<R>, P, Option<&'a gfx::Mesh<R>>, &'a gfx::DrawState, );
pub trait Technique<R: gfx::Resources, M: Material, V: ToDepth> {
type Kernel: Copy + Debug + Eq + Hash;
type Params: gfx::shade::ShaderParam<Resources = R>;
fn test(&self, &gfx::Mesh<R>, &M) -> Option<Self::Kernel>;
fn compile<'a>(&'a self, Self::Kernel, &V)
-> TechResult<'a, R, Self::Params>;
fn fix_params(&self, &M, &V, &mut Self::Params);
}