veloren/voxygen/src/render/mod.rs

65 lines
2.0 KiB
Rust
Raw Normal View History

pub mod consts;
2019-08-19 17:23:47 +00:00
pub mod instances;
pub mod mesh;
pub mod model;
pub mod pipelines;
pub mod renderer;
pub mod texture;
mod util;
2019-01-07 21:10:31 +00:00
// Reexports
pub use self::{
2019-01-11 20:14:37 +00:00
consts::Consts,
mesh::{Mesh, Quad, Tri},
model::{DynamicModel, Model},
2019-01-11 20:14:37 +00:00
pipelines::{
figure::{BoneData as FigureBoneData, FigurePipeline, Locals as FigureLocals},
fluid::FluidPipeline,
postprocess::{
create_mesh as create_pp_mesh, Locals as PostProcessLocals, PostProcessPipeline,
},
skybox::{create_mesh as create_skybox_mesh, Locals as SkyboxLocals, SkyboxPipeline},
2019-08-19 17:01:23 +00:00
sprite::{Instance as SpriteInstance, SpritePipeline},
terrain::{Locals as TerrainLocals, TerrainPipeline},
ui::{
create_quad as create_ui_quad, create_tri as create_ui_tri, Locals as UiLocals,
Mode as UiMode, UiPipeline,
},
2019-07-21 15:04:36 +00:00
Globals, Light,
2019-01-11 20:14:37 +00:00
},
renderer::{Renderer, TgtColorFmt, TgtDepthFmt, WinColorFmt, WinDepthFmt},
texture::Texture,
2019-01-07 21:10:31 +00:00
};
2019-01-11 17:30:13 +00:00
#[cfg(feature = "gl")]
use gfx_device_gl as gfx_backend;
2019-01-07 21:10:31 +00:00
2019-01-11 20:14:37 +00:00
use gfx;
/// Used to represent one of many possible errors that may be omitted by the rendering subsystem.
2019-01-07 21:10:31 +00:00
#[derive(Debug)]
pub enum RenderError {
PipelineError(gfx::PipelineStateError<String>),
UpdateError(gfx::UpdateError<usize>),
TexUpdateError(gfx::UpdateError<[u16; 3]>),
CombinedError(gfx::CombinedError),
BufferCreationError(gfx::buffer::CreationError),
IncludeError(glsl_include::Error),
MappingError(gfx::mapping::Error),
CopyError(gfx::CopyError<[u16; 3], usize>),
2019-01-11 20:14:37 +00:00
}
2019-01-07 21:10:31 +00:00
/// Used to represent a specific rendering configuration.
///
/// Note that pipelines are tied to the
/// rendering backend, and as such it is necessary to modify the rendering subsystem when adding
/// new pipelines - custom pipelines are not currently an objective of the rendering subsystem.
///
/// # Examples
///
/// - `SkyboxPipeline`
/// - `FigurePipeline`
2019-01-07 21:10:31 +00:00
pub trait Pipeline {
type Vertex: Clone + gfx::traits::Pod + gfx::pso::buffer::Structure<gfx::format::Format>;
2019-01-07 21:10:31 +00:00
}