pub struct SimpleFrameBuffer<'a> { /* private fields */ }
Expand description
A framebuffer which has only one color attachment.
Implementations§
Source§impl<'a> SimpleFrameBuffer<'a>
impl<'a> SimpleFrameBuffer<'a>
Sourcepub fn new<F, C>(
facade: &F,
color: C,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn new<F, C>( facade: &F, color: C, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a single color attachment and no depth
nor stencil buffer.
Sourcepub fn with_depth_buffer<F, C, D>(
facade: &F,
color: C,
depth: D,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn with_depth_buffer<F, C, D>( facade: &F, color: C, depth: D, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a single color attachment and a depth
buffer, but no stencil buffer.
Sourcepub fn depth_only<F, D>(
facade: &F,
depth: D,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn depth_only<F, D>( facade: &F, depth: D, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a depth buffer and no color attachment
nor stencil buffer.
Sourcepub fn with_depth_and_stencil_buffer<F, C, D, S>(
facade: &F,
color: C,
depth: D,
stencil: S,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>where
C: ToColorAttachment<'a>,
D: ToDepthAttachment<'a>,
S: ToStencilAttachment<'a>,
F: Facade + ?Sized,
pub fn with_depth_and_stencil_buffer<F, C, D, S>(
facade: &F,
color: C,
depth: D,
stencil: S,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>where
C: ToColorAttachment<'a>,
D: ToDepthAttachment<'a>,
S: ToStencilAttachment<'a>,
F: Facade + ?Sized,
Creates a SimpleFrameBuffer
with a single color attachment, a depth
buffer, and a stencil buffer.
Sourcepub fn depth_and_stencil_only<F, D, S>(
facade: &F,
depth: D,
stencil: S,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn depth_and_stencil_only<F, D, S>( facade: &F, depth: D, stencil: S, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a depth buffer and a stencil buffer,
but no color attachment.
Sourcepub fn with_stencil_buffer<F, C, S>(
facade: &F,
color: C,
stencil: S,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn with_stencil_buffer<F, C, S>( facade: &F, color: C, stencil: S, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a single color attachment and a stencil
buffer, but no depth buffer.
Sourcepub fn stencil_only<F, S>(
facade: &F,
stencil: S,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn stencil_only<F, S>( facade: &F, stencil: S, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a stencil buffer and no color attachment
nor depth buffer.
Sourcepub fn with_depth_stencil_buffer<F, C, D>(
facade: &F,
color: C,
depthstencil: D,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn with_depth_stencil_buffer<F, C, D>( facade: &F, color: C, depthstencil: D, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a single color attachment and a depth-stencil buffer.
Sourcepub fn depth_stencil_only<F, D>(
facade: &F,
depthstencil: D,
) -> Result<SimpleFrameBuffer<'a>, ValidationError>
pub fn depth_stencil_only<F, D>( facade: &F, depthstencil: D, ) -> Result<SimpleFrameBuffer<'a>, ValidationError>
Creates a SimpleFrameBuffer
with a depth-stencil buffer and no color attachment.
Trait Implementations§
Source§impl<'a> Surface for SimpleFrameBuffer<'a>
impl<'a> Surface for SimpleFrameBuffer<'a>
Source§fn clear(
&mut self,
rect: Option<&Rect>,
color: Option<(f32, f32, f32, f32)>,
color_srgb: bool,
depth: Option<f32>,
stencil: Option<i32>,
)
fn clear( &mut self, rect: Option<&Rect>, color: Option<(f32, f32, f32, f32)>, color_srgb: bool, depth: Option<f32>, stencil: Option<i32>, )
Source§fn get_dimensions(&self) -> (u32, u32)
fn get_dimensions(&self) -> (u32, u32)
Source§fn get_depth_buffer_bits(&self) -> Option<u16>
fn get_depth_buffer_bits(&self) -> Option<u16>
Source§fn get_stencil_buffer_bits(&self) -> Option<u16>
fn get_stencil_buffer_bits(&self) -> Option<u16>
Source§fn draw<'b, 'v, V, I, U>(
&mut self,
vb: V,
ib: I,
program: &Program,
uniforms: &U,
draw_parameters: &DrawParameters<'_>,
) -> Result<(), DrawError>
fn draw<'b, 'v, V, I, U>( &mut self, vb: V, ib: I, program: &Program, uniforms: &U, draw_parameters: &DrawParameters<'_>, ) -> Result<(), DrawError>
Source§fn blit_color<S>(
&self,
source_rect: &Rect,
target: &S,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
)where
S: Surface,
fn blit_color<S>(
&self,
source_rect: &Rect,
target: &S,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
)where
S: Surface,
Source§fn blit_buffers_from_frame(
&self,
source_rect: &Rect,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
mask: BlitMask,
)
fn blit_buffers_from_frame( &self, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter, mask: BlitMask, )
Source§fn blit_buffers_from_simple_framebuffer(
&self,
source: &SimpleFrameBuffer<'_>,
source_rect: &Rect,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
mask: BlitMask,
)
fn blit_buffers_from_simple_framebuffer( &self, source: &SimpleFrameBuffer<'_>, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter, mask: BlitMask, )
Source§fn blit_buffers_from_multioutput_framebuffer(
&self,
source: &MultiOutputFrameBuffer<'_>,
source_rect: &Rect,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
mask: BlitMask,
)
fn blit_buffers_from_multioutput_framebuffer( &self, source: &MultiOutputFrameBuffer<'_>, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter, mask: BlitMask, )
Source§fn clear_color(&mut self, red: f32, green: f32, blue: f32, alpha: f32)
fn clear_color(&mut self, red: f32, green: f32, blue: f32, alpha: f32)
Source§fn clear_color_srgb(&mut self, red: f32, green: f32, blue: f32, alpha: f32)
fn clear_color_srgb(&mut self, red: f32, green: f32, blue: f32, alpha: f32)
Source§fn clear_depth(&mut self, value: f32)
fn clear_depth(&mut self, value: f32)
Source§fn clear_stencil(&mut self, value: i32)
fn clear_stencil(&mut self, value: i32)
Source§fn clear_color_and_depth(&mut self, color: (f32, f32, f32, f32), depth: f32)
fn clear_color_and_depth(&mut self, color: (f32, f32, f32, f32), depth: f32)
Source§fn clear_color_srgb_and_depth(
&mut self,
color: (f32, f32, f32, f32),
depth: f32,
)
fn clear_color_srgb_and_depth( &mut self, color: (f32, f32, f32, f32), depth: f32, )
Source§fn clear_color_and_stencil(&mut self, color: (f32, f32, f32, f32), stencil: i32)
fn clear_color_and_stencil(&mut self, color: (f32, f32, f32, f32), stencil: i32)
Source§fn clear_color_srgb_and_stencil(
&mut self,
color: (f32, f32, f32, f32),
stencil: i32,
)
fn clear_color_srgb_and_stencil( &mut self, color: (f32, f32, f32, f32), stencil: i32, )
Source§fn clear_depth_and_stencil(&mut self, depth: f32, stencil: i32)
fn clear_depth_and_stencil(&mut self, depth: f32, stencil: i32)
Source§fn clear_all(&mut self, color: (f32, f32, f32, f32), depth: f32, stencil: i32)
fn clear_all(&mut self, color: (f32, f32, f32, f32), depth: f32, stencil: i32)
Source§fn clear_all_srgb(
&mut self,
color: (f32, f32, f32, f32),
depth: f32,
stencil: i32,
)
fn clear_all_srgb( &mut self, color: (f32, f32, f32, f32), depth: f32, stencil: i32, )
Source§fn has_depth_buffer(&self) -> bool
fn has_depth_buffer(&self) -> bool
Source§fn has_stencil_buffer(&self) -> bool
fn has_stencil_buffer(&self) -> bool
Source§fn blit_from_frame(
&self,
source_rect: &Rect,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
)
fn blit_from_frame( &self, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter, )
Source§fn blit_from_simple_framebuffer(
&self,
source: &SimpleFrameBuffer<'_>,
source_rect: &Rect,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
)
fn blit_from_simple_framebuffer( &self, source: &SimpleFrameBuffer<'_>, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter, )
Source§fn blit_from_multioutput_framebuffer(
&self,
source: &MultiOutputFrameBuffer<'_>,
source_rect: &Rect,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
)
fn blit_from_multioutput_framebuffer( &self, source: &MultiOutputFrameBuffer<'_>, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter, )
Source§fn blit_whole_color_to<S>(
&self,
target: &S,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
)where
S: Surface,
fn blit_whole_color_to<S>(
&self,
target: &S,
target_rect: &BlitTarget,
filter: MagnifySamplerFilter,
)where
S: Surface,
blit_color
.Auto Trait Implementations§
impl<'a> Freeze for SimpleFrameBuffer<'a>
impl<'a> !RefUnwindSafe for SimpleFrameBuffer<'a>
impl<'a> !Send for SimpleFrameBuffer<'a>
impl<'a> !Sync for SimpleFrameBuffer<'a>
impl<'a> Unpin for SimpleFrameBuffer<'a>
impl<'a> !UnwindSafe for SimpleFrameBuffer<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.