Crate amethyst_renderer [−]
A data parallel rendering engine developed by the Amethyst project. The source code is available for download on GitHub. See the online book for a complete guide to using Amethyst.
Example
let mut events = glutin::EventsLoop::new(); let mut renderer = Renderer::new(&events)?; let pipe = renderer.create_pipe(Pipeline::deferred())?; let verts = some_sphere_gen_func(); let sphere = renderer.create_mesh(Mesh::build(&verts))?; let light = PointLight::default(); let mut scene = Scene::default(); //scene.add_mesh(sphere) scene.add_light(light); let mut delta = Duration::from_secs(0); let mut running = true; while running { let start = Instant::now(); events.poll_events(|e| { match e { glutin::Event::WindowEvent { event, .. } => match event { glutin::WindowEvent::KeyboardInput { .. } | glutin::WindowEvent::Closed => running = false, _ => (), }, _ => (), } }); renderer.draw(&scene, &pipe, delta); delta = Instant::now() - start; }
Reexports
pub use light::Light; |
pub use pipe::Pipeline; |
pub use pipe::PipelineBuilder; |
pub use vertex::VertexFormat; |
Modules
light |
Light sources. |
pass |
Different kinds of render passes. |
pipe |
Renderer pipeline configuration. |
prelude |
Contains common types that can be glob-imported ( |
vertex |
Built-in vertex formats. |
Structs
Camera |
Camera struct. |
Config |
Structure for holding the renderer configuration. |
Material |
Material struct. |
MaterialBuilder |
Builds new materials. |
Mesh |
Represents a polygonal mesh. |
MeshBuilder |
Builds new meshes. |
Model |
A renderable object in a scene. |
Renderer |
Generic renderer. |
RendererBuilder |
Constructs a new |
Rgba |
An RGBA color value. |
Scene |
Collection of lights and meshes to render. |
Stage |
A stage in the rendering pipeline. |
Target |
A render target. |
Texture |
Handle to a GPU texture resource. |
TextureBuilder |
Builds new textures. |
Enums
Error |
Common renderer error type. |
Projection |
The projection mode of a |
Type Definitions
Encoder |
Command buffer encoder type. |
Factory |
Graphics factory type. |
Result |
Renderer result type. |