Struct ringl::renderer::Renderer [−][src]
#[must_use = "Calling with on a renderer doesn\'t change that renderer, it returns a new one with the properties applied. Instead of calling `gl.with(...)` do `let gl = gl.with(...)`"]pub struct Renderer<'c, R: RenderSurface + 'c = Screen> { /* fields omitted */ }
Methods
impl<'c> Renderer<'c>
[src]
impl<'c> Renderer<'c>
pub fn new<'w, W: WindowT + GlWindow>(
window: &'w mut W
) -> Result<Renderer<'static>>
[src]
pub fn new<'w, W: WindowT + GlWindow>(
window: &'w mut W
) -> Result<Renderer<'static>>
pub fn with_default_properties<'w, W: WindowT + GlWindow>(
window: &'w mut W,
default_properties: &[Property]
) -> Result<Renderer<'static>>
[src]
pub fn with_default_properties<'w, W: WindowT + GlWindow>(
window: &'w mut W,
default_properties: &[Property]
) -> Result<Renderer<'static>>
impl<'c, R: RenderSurface + 'c> Renderer<'c, R>
[src]
impl<'c, R: RenderSurface + 'c> Renderer<'c, R>
pub fn resolution_factor(&self) -> f32
[src]
pub fn resolution_factor(&self) -> f32
pub fn clear_color<C: ToRgba>(&self, color: &C)
[src]
pub fn clear_color<C: ToRgba>(&self, color: &C)
pub fn clear_depth(&self)
[src]
pub fn clear_depth(&self)
pub fn clear_stencil(&self)
[src]
pub fn clear_stencil(&self)
pub fn mvp(&self) -> &Mvp
[src]
pub fn mvp(&self) -> &Mvp
pub fn with_camera_viewport<C: CameraT>(
&self,
camera: &C,
viewport: &Rect<i32>
) -> Renderer<R>
[src]
pub fn with_camera_viewport<C: CameraT>(
&self,
camera: &C,
viewport: &Rect<i32>
) -> Renderer<R>
pub fn with_mvp<M: Into<Mvp>>(&self, mvp: M) -> Renderer<R>
[src]
pub fn with_mvp<M: Into<Mvp>>(&self, mvp: M) -> Renderer<R>
pub fn with_model<M: Into<Model>>(&self, model: M) -> Renderer<R>
[src]
pub fn with_model<M: Into<Model>>(&self, model: M) -> Renderer<R>
pub fn with_properties(&self, properties: &[Property]) -> Renderer<R>
[src]
pub fn with_properties(&self, properties: &[Property]) -> Renderer<R>
pub fn id(&self) -> usize
[src]
pub fn id(&self) -> usize
pub fn context(&self) -> &Context<R>
[src]
pub fn context(&self) -> &Context<R>
pub fn new_texture(&self) -> Builder
[src]
pub fn new_texture(&self) -> Builder
pub fn new_cubemap(&self) -> Builder
[src]
pub fn new_cubemap(&self) -> Builder
pub fn new_buffer(&self) -> Builder
[src]
pub fn new_buffer(&self) -> Builder
pub fn new_vao(&self) -> Builder
[src]
pub fn new_vao(&self) -> Builder
pub fn new_simple_vao(&self) -> Builder
[src]
pub fn new_simple_vao(&self) -> Builder
pub fn new_program(&self) -> Builder
[src]
pub fn new_program(&self) -> Builder
pub fn new_shadow_map(&self) -> Builder
[src]
pub fn new_shadow_map(&self) -> Builder
pub fn new_ttf<'a>(&'a self, path: &'a str, pt_height: f32) -> Builder<'a>
[src]
pub fn new_ttf<'a>(&'a self, path: &'a str, pt_height: f32) -> Builder<'a>
pub fn new_vao_mesh(&self) -> Builder
[src]
pub fn new_vao_mesh(&self) -> Builder
pub fn new_vao_path(&self) -> Builder
[src]
pub fn new_vao_path(&self) -> Builder
pub fn new_auto_program<P: AsRef<Path> + Clone + 'static>(
&self,
settings: ProgramSettings<P>
) -> AutoLoader<Program>
[src]
pub fn new_auto_program<P: AsRef<Path> + Clone + 'static>(
&self,
settings: ProgramSettings<P>
) -> AutoLoader<Program>
pub fn new_pbr_material(&self) -> Builder
[src]
pub fn new_pbr_material(&self) -> Builder
pub fn new_skybox(&self) -> Builder
[src]
pub fn new_skybox(&self) -> Builder
pub fn new_ibl(&self) -> Builder
[src]
pub fn new_ibl(&self) -> Builder
pub fn new_object(&self) -> Builder
[src]
pub fn new_object(&self) -> Builder
pub fn to_simple_vao<T, U, M: ToSimpleVao<T, U>>(
&self,
mesh: &M
) -> Result<SimpleVao<T>>
[src]
pub fn to_simple_vao<T, U, M: ToSimpleVao<T, U>>(
&self,
mesh: &M
) -> Result<SimpleVao<T>>
pub fn creation_proxy(&self) -> CreationProxy
[src]
pub fn creation_proxy(&self) -> CreationProxy
impl<'c> Renderer<'c>
[src]
impl<'c> Renderer<'c>
pub fn with_fbo<'f, F: OffscreenBuffer>(&'f self, fbo: &'f F) -> Renderer<'f, F>
[src]
pub fn with_fbo<'f, F: OffscreenBuffer>(&'f self, fbo: &'f F) -> Renderer<'f, F>
pub fn new_fbo(&self) -> Builder
[src]
pub fn new_fbo(&self) -> Builder
pub fn new_fbo_color_attachment(&self) -> ColorAttachmentBuilder
[src]
pub fn new_fbo_color_attachment(&self) -> ColorAttachmentBuilder
pub fn new_fbo_depth_attachment(&self) -> DepthAttachmentBuilder
[src]
pub fn new_fbo_depth_attachment(&self) -> DepthAttachmentBuilder
pub fn new_render_buffer(&self) -> RenderBufferBuilder
[src]
pub fn new_render_buffer(&self) -> RenderBufferBuilder
pub fn new_simple_fbo(
&self,
w: u32,
h: u32,
format: ColorFormat
) -> Result<SimpleFbo>
[src]
pub fn new_simple_fbo(
&self,
w: u32,
h: u32,
format: ColorFormat
) -> Result<SimpleFbo>
pub fn new_simple_fbo_multisampled(
&self,
w: u32,
h: u32,
samples: u32,
format: ColorFormat
) -> Result<SimpleFbo>
[src]
pub fn new_simple_fbo_multisampled(
&self,
w: u32,
h: u32,
samples: u32,
format: ColorFormat
) -> Result<SimpleFbo>
Trait Implementations
impl<'c, R: RenderSurface> CreationContext for Renderer<'c, R>
[src]
impl<'c, R: RenderSurface> CreationContext for Renderer<'c, R>
fn new_shadow_map(&self) -> Builder
[src]
fn new_shadow_map(&self) -> Builder
fn new_ttf<'a>(&'a self, path: &'a str, pt_height: f32) -> Builder<'a>
[src]
fn new_ttf<'a>(&'a self, path: &'a str, pt_height: f32) -> Builder<'a>
fn new_vao_mesh(&self) -> Builder
[src]
fn new_vao_mesh(&self) -> Builder
fn new_vao_path(&self) -> Builder
[src]
fn new_vao_path(&self) -> Builder
fn new_auto_program<P: AsRef<Path> + Clone + 'static>(
&self,
settings: ProgramSettings<P>
) -> AutoLoader<Program>
[src]
fn new_auto_program<P: AsRef<Path> + Clone + 'static>(
&self,
settings: ProgramSettings<P>
) -> AutoLoader<Program>
fn to_simple_vao<T, U, M: ToSimpleVao<T, U>>(
&self,
mesh: &M
) -> Result<SimpleVao<T>>
[src]
fn to_simple_vao<T, U, M: ToSimpleVao<T, U>>(
&self,
mesh: &M
) -> Result<SimpleVao<T>>
impl<'c, R: RenderSurface> CreationContext for Renderer<'c, R>
[src]
impl<'c, R: RenderSurface> CreationContext for Renderer<'c, R>
fn new_texture(&self) -> Builder
[src]
fn new_texture(&self) -> Builder
fn new_cubemap(&self) -> Builder
[src]
fn new_cubemap(&self) -> Builder
fn new_buffer(&self) -> Builder
[src]
fn new_buffer(&self) -> Builder
fn new_vao(&self) -> Builder
[src]
fn new_vao(&self) -> Builder
fn new_simple_vao(&self) -> Builder
[src]
fn new_simple_vao(&self) -> Builder
fn new_program(&self) -> Builder
[src]
fn new_program(&self) -> Builder
fn creation_proxy(&self) -> &Rc<CreationProxy>
[src]
fn creation_proxy(&self) -> &Rc<CreationProxy>
impl<'c> SurfaceCreationContext for Renderer<'c>
[src]
impl<'c> SurfaceCreationContext for Renderer<'c>
fn new_fbo(&self) -> Builder
[src]
fn new_fbo(&self) -> Builder
fn new_fbo_color_attachment(&self) -> ColorAttachmentBuilder
[src]
fn new_fbo_color_attachment(&self) -> ColorAttachmentBuilder
fn new_fbo_depth_attachment(&self) -> DepthAttachmentBuilder
[src]
fn new_fbo_depth_attachment(&self) -> DepthAttachmentBuilder
fn new_render_buffer(&self) -> RenderBufferBuilder
[src]
fn new_render_buffer(&self) -> RenderBufferBuilder
impl<'c, R: RenderSurface + 'c> Renderer2d for Renderer<'c, R>
[src]
impl<'c, R: RenderSurface + 'c> Renderer2d for Renderer<'c, R>
fn draw_mesh_with_material<T, M: Material>(&self, mesh: &Mesh<T>, material: &M) where
T: VertexFormat + Clone + 'static,
[src]
fn draw_mesh_with_material<T, M: Material>(&self, mesh: &Mesh<T>, material: &M) where
T: VertexFormat + Clone + 'static,
fn draw_pos<M: Material, O: Render2d<Material = M>>(&self, obj: O, pos: &Pnt2)
[src]
fn draw_pos<M: Material, O: Render2d<Material = M>>(&self, obj: O, pos: &Pnt2)
fn draw_size<M: Material, O: Render2d<Material = M>>(
&self,
obj: O,
pos: &Pnt2,
size: &Vec2
)
[src]
fn draw_size<M: Material, O: Render2d<Material = M>>(
&self,
obj: O,
pos: &Pnt2,
size: &Vec2
)
fn draw_rect<M: Material, O: Render2d<Material = M>>(
&self,
obj: O,
rect: &Rect<f32>
)
[src]
fn draw_rect<M: Material, O: Render2d<Material = M>>(
&self,
obj: O,
rect: &Rect<f32>
)
fn draw_pos_with_material<M: Material, M2: Material, O: Render2d<Material = M>>(
&self,
obj: O,
pos: &Pnt2,
mat: &M2
)
[src]
fn draw_pos_with_material<M: Material, M2: Material, O: Render2d<Material = M>>(
&self,
obj: O,
pos: &Pnt2,
mat: &M2
)
fn draw_size_with_material<M: Material, M2: Material, O: Render2d<Material = M>>(
&self,
obj: O,
pos: &Pnt2,
size: &Vec2,
mat: &M2
)
[src]
fn draw_size_with_material<M: Material, M2: Material, O: Render2d<Material = M>>(
&self,
obj: O,
pos: &Pnt2,
size: &Vec2,
mat: &M2
)
fn draw_rect_with_material<M: Material, M2: Material, O: Render2d<Material = M>>(
&self,
obj: O,
rect: &Rect<f32>,
mat: &M2
)
[src]
fn draw_rect_with_material<M: Material, M2: Material, O: Render2d<Material = M>>(
&self,
obj: O,
rect: &Rect<f32>,
mat: &M2
)
impl<'c, R: RenderSurface + 'c> Renderer3d for Renderer<'c, R>
[src]
impl<'c, R: RenderSurface + 'c> Renderer3d for Renderer<'c, R>
fn draw<O: Render3d>(&self, obj: &O)
[src]
fn draw<O: Render3d>(&self, obj: &O)
fn draw_with_material<V, M>(&self, obj: &Object<V>, material: &M) where
&'a V: VaoDraw,
M: Material,
[src]
fn draw_with_material<V, M>(&self, obj: &Object<V>, material: &M) where
&'a V: VaoDraw,
M: Material,
fn draw_vao_with_material<V, M>(&self, vao: V, material: &M) where
V: VaoDraw,
M: Material,
[src]
fn draw_vao_with_material<V, M>(&self, vao: V, material: &M) where
V: VaoDraw,
M: Material,
fn draw_vao<V: VaoDraw>(
&self,
vao_range: V,
program: &Program,
uniforms: &[Uniform]
)
[src]
fn draw_vao<V: VaoDraw>(
&self,
vao_range: V,
program: &Program,
uniforms: &[Uniform]
)
impl<'c, R: RenderSurface + 'c> Renderer for Renderer<'c, R>
[src]
impl<'c, R: RenderSurface + 'c> Renderer for Renderer<'c, R>
fn clear<C: ToRgba>(&self, color: &C)
[src]
fn clear<C: ToRgba>(&self, color: &C)
fn draw_mesh<T>(&self, mesh: &Mesh<T>) where
T: VertexFormat + Clone + 'static,
[src]
fn draw_mesh<T>(&self, mesh: &Mesh<T>) where
T: VertexFormat + Clone + 'static,
fn draw_string<C: ToRgba>(
&self,
font: &Ttf,
string: &str,
x: f32,
y: f32,
color: &C
)
[src]
fn draw_string<C: ToRgba>(
&self,
font: &Ttf,
string: &str,
x: f32,
y: f32,
color: &C
)
fn draw_string_box<C: ToRgba>(
&self,
font: &Ttf,
string: &str,
x: f32,
y: f32,
w: f32,
h: f32,
color: &C
)
[src]
fn draw_string_box<C: ToRgba>(
&self,
font: &Ttf,
string: &str,
x: f32,
y: f32,
w: f32,
h: f32,
color: &C
)
fn draw_bitmap_string<C: ToRgba>(&self, string: &str, x: f32, y: f32, color: &C)
[src]
fn draw_bitmap_string<C: ToRgba>(&self, string: &str, x: f32, y: f32, color: &C)
fn draw_line<C: ToRgba>(&self, from: &Pnt2, to: &Pnt2, color: &C)
[src]
fn draw_line<C: ToRgba>(&self, from: &Pnt2, to: &Pnt2, color: &C)
fn draw_rectangle_fill<C: ToRgba>(&self, pos: &Pnt2, w: f32, h: f32, color: &C)
[src]
fn draw_rectangle_fill<C: ToRgba>(&self, pos: &Pnt2, w: f32, h: f32, color: &C)
fn draw_rectangle_lines<C: ToRgba>(&self, pos: &Pnt2, w: f32, h: f32, color: &C)
[src]
fn draw_rectangle_lines<C: ToRgba>(&self, pos: &Pnt2, w: f32, h: f32, color: &C)
fn draw_circle_fill<C: ToRgba>(&self, x: f32, y: f32, r: f32, color: &C)
[src]
fn draw_circle_fill<C: ToRgba>(&self, x: f32, y: f32, r: f32, color: &C)
fn draw_circle_lines<C: ToRgba>(&self, x: f32, y: f32, r: f32, color: &C)
[src]
fn draw_circle_lines<C: ToRgba>(&self, x: f32, y: f32, r: f32, color: &C)
fn draw_ellipse_fill<C: ToRgba>(
&self,
x: f32,
y: f32,
w: f32,
h: f32,
color: &C
)
[src]
fn draw_ellipse_fill<C: ToRgba>(
&self,
x: f32,
y: f32,
w: f32,
h: f32,
color: &C
)
fn draw_ellipse_lines<C: ToRgba>(
&self,
x: f32,
y: f32,
w: f32,
h: f32,
color: &C
)
[src]
fn draw_ellipse_lines<C: ToRgba>(
&self,
x: f32,
y: f32,
w: f32,
h: f32,
color: &C
)
fn origin(&self) -> CoordinateOrigin
[src]
fn origin(&self) -> CoordinateOrigin