2020-06-10 19:47:36 +00:00
|
|
|
#[allow(clippy::single_component_path_imports)] // TODO: Pending review in #587
|
2019-01-11 23:18:34 +00:00
|
|
|
pub mod consts;
|
2019-09-26 03:19:45 +00:00
|
|
|
mod error;
|
2019-08-19 17:23:47 +00:00
|
|
|
pub mod instances;
|
2019-01-11 23:18:34 +00:00
|
|
|
pub mod mesh;
|
|
|
|
pub mod model;
|
|
|
|
pub mod pipelines;
|
|
|
|
pub mod renderer;
|
2019-01-30 12:11:34 +00:00
|
|
|
pub mod texture;
|
2019-01-07 21:10:31 +00:00
|
|
|
|
|
|
|
// Reexports
|
|
|
|
pub use self::{
|
2019-01-11 20:14:37 +00:00
|
|
|
consts::Consts,
|
2019-09-26 03:19:45 +00:00
|
|
|
error::RenderError,
|
2019-08-19 20:09:35 +00:00
|
|
|
instances::Instances,
|
2019-04-29 20:37:19 +00:00
|
|
|
mesh::{Mesh, Quad, Tri},
|
2019-05-04 14:28:21 +00:00
|
|
|
model::{DynamicModel, Model},
|
2019-01-11 20:14:37 +00:00
|
|
|
pipelines::{
|
2019-04-29 20:37:19 +00:00
|
|
|
figure::{BoneData as FigureBoneData, FigurePipeline, Locals as FigureLocals},
|
2019-08-14 21:28:37 +00:00
|
|
|
fluid::FluidPipeline,
|
2020-07-25 15:56:50 +00:00
|
|
|
particle::{Instance as ParticleInstance, ParticlePipeline},
|
2019-05-06 08:22:47 +00:00
|
|
|
postprocess::{
|
|
|
|
create_mesh as create_pp_mesh, Locals as PostProcessLocals, PostProcessPipeline,
|
|
|
|
},
|
2019-04-29 20:37:19 +00:00
|
|
|
skybox::{create_mesh as create_skybox_mesh, Locals as SkyboxLocals, SkyboxPipeline},
|
2019-08-19 17:01:23 +00:00
|
|
|
sprite::{Instance as SpriteInstance, SpritePipeline},
|
2019-04-29 20:37:19 +00:00
|
|
|
terrain::{Locals as TerrainLocals, TerrainPipeline},
|
2019-01-30 12:11:34 +00:00
|
|
|
ui::{
|
2019-05-14 06:43:07 +00:00
|
|
|
create_quad as create_ui_quad, create_tri as create_ui_tri, Locals as UiLocals,
|
|
|
|
Mode as UiMode, UiPipeline,
|
2019-01-30 12:11:34 +00:00
|
|
|
},
|
2019-09-25 12:00:00 +00:00
|
|
|
Globals, Light, Shadow,
|
2019-01-11 20:14:37 +00:00
|
|
|
},
|
2020-04-04 19:36:55 +00:00
|
|
|
renderer::{Renderer, TgtColorFmt, TgtDepthStencilFmt, WinColorFmt, WinDepthFmt},
|
2019-04-29 20:37:19 +00:00
|
|
|
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-12 13:56:34 +00:00
|
|
|
/// Used to represent a specific rendering configuration.
|
|
|
|
///
|
|
|
|
/// Note that pipelines are tied to the
|
2020-02-01 20:39:39 +00:00
|
|
|
/// 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.
|
2019-01-12 13:56:34 +00:00
|
|
|
///
|
|
|
|
/// # Examples
|
|
|
|
///
|
|
|
|
/// - `SkyboxPipeline`
|
2019-01-13 20:53:55 +00:00
|
|
|
/// - `FigurePipeline`
|
2019-01-07 21:10:31 +00:00
|
|
|
pub trait Pipeline {
|
2019-04-29 20:37:19 +00:00
|
|
|
type Vertex: Clone + gfx::traits::Pod + gfx::pso::buffer::Structure<gfx::format::Format>;
|
2019-01-07 21:10:31 +00:00
|
|
|
}
|
2019-09-26 07:28:40 +00:00
|
|
|
|
|
|
|
use serde_derive::{Deserialize, Serialize};
|
|
|
|
/// Anti-aliasing modes
|
|
|
|
#[derive(PartialEq, Eq, Clone, Copy, Debug, Serialize, Deserialize)]
|
|
|
|
pub enum AaMode {
|
|
|
|
None,
|
|
|
|
Fxaa,
|
|
|
|
MsaaX4,
|
|
|
|
MsaaX8,
|
|
|
|
MsaaX16,
|
|
|
|
SsaaX4,
|
|
|
|
}
|
2020-01-19 03:58:25 +00:00
|
|
|
|
|
|
|
/// Cloud modes
|
|
|
|
#[derive(PartialEq, Eq, Clone, Copy, Debug, Serialize, Deserialize)]
|
|
|
|
pub enum CloudMode {
|
|
|
|
None,
|
|
|
|
Regular,
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Fluid modes
|
|
|
|
#[derive(PartialEq, Eq, Clone, Copy, Debug, Serialize, Deserialize)]
|
|
|
|
pub enum FluidMode {
|
|
|
|
Cheap,
|
|
|
|
Shiny,
|
|
|
|
}
|