pub struct EmptyFrameBuffer { /* private fields */ }
Expand description

A framebuffer with no attachment at all.

Note that this is only supported on recent hardware.

Implementations§

source§

impl<'a> EmptyFrameBuffer

source

pub fn is_supported<C>(context: &C) -> boolwhere C: CapabilitiesSource + ?Sized,

Returns true if empty framebuffers are supported by the backend.

source

pub fn is_layered_supported<C>(context: &C) -> boolwhere C: CapabilitiesSource + ?Sized,

Returns true if layered empty framebuffers are supported by the backend.

source

pub fn get_max_supported_width<C>(context: &C) -> Option<u32>where C: CapabilitiesSource + ?Sized,

Returns the maximum width of empty framebuffers that the backend supports, or None if empty framebuffers are not supported.

source

pub fn get_max_supported_height<C>(context: &C) -> Option<u32>where C: CapabilitiesSource + ?Sized,

Returns the maximum height of empty framebuffers that the backend supports, or None if empty framebuffers are not supported.

source

pub fn get_max_supported_samples<C>(context: &C) -> Option<u32>where C: CapabilitiesSource + ?Sized,

Returns the maximum number of samples of empty framebuffers that the backend supports, or None if empty framebuffers are not supported.

source

pub fn get_max_supported_layers<C>(context: &C) -> Option<u32>where C: CapabilitiesSource + ?Sized,

Returns the maximum number of layers of empty framebuffers that the backend supports, or None if layered empty framebuffers are not supported.

source

pub fn new<F>( facade: &F, width: u32, height: u32, layers: Option<u32>, samples: Option<u32>, fixed_samples: bool ) -> Result<EmptyFrameBuffer, ValidationError>where F: Facade + ?Sized,

Creates a EmptyFrameBuffer.

Panic

Panics if layers or samples is equal to Some(0).

Trait Implementations§

source§

impl Surface for EmptyFrameBuffer

source§

fn clear( &mut self, rect: Option<&Rect>, color: Option<(f32, f32, f32, f32)>, color_srgb: bool, depth: Option<f32>, stencil: Option<i32> )

Clears some attachments of the target.
source§

fn get_dimensions(&self) -> (u32, u32)

Returns the dimensions in pixels of the target.
source§

fn get_depth_buffer_bits(&self) -> Option<u16>

Returns the number of bits of each pixel of the depth buffer. Read more
source§

fn get_stencil_buffer_bits(&self) -> Option<u16>

Returns the number of bits of each pixel of the stencil buffer. Read more
source§

fn draw<'b, 'v, V, I, U>( &mut self, vb: V, ib: I, program: &Program, uniforms: &U, draw_parameters: &DrawParameters<'_> ) -> Result<(), DrawError>where I: Into<IndicesSource<'b>>, U: Uniforms, V: MultiVerticesSource<'v>,

Draws. Read more
source§

fn blit_color<S>( &self, source_rect: &Rect, target: &S, target_rect: &BlitTarget, filter: MagnifySamplerFilter )where S: Surface,

Copies a rectangle of pixels from this surface to another surface. Read more
source§

fn blit_from_frame( &self, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter )

Blits from the default framebuffer.
source§

fn blit_from_simple_framebuffer( &self, source: &SimpleFrameBuffer<'_>, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter )

Blits from a simple framebuffer.
source§

fn blit_from_multioutput_framebuffer( &self, source: &MultiOutputFrameBuffer<'_>, source_rect: &Rect, target_rect: &BlitTarget, filter: MagnifySamplerFilter )

Blits from a multi-output framebuffer.
source§

fn clear_color(&mut self, red: f32, green: f32, blue: f32, alpha: f32)

Clears the color attachment of the target.
source§

fn clear_color_srgb(&mut self, red: f32, green: f32, blue: f32, alpha: f32)

Clears the color attachment of the target. The color is in sRGB format.
source§

fn clear_depth(&mut self, value: f32)

Clears the depth attachment of the target.
source§

fn clear_stencil(&mut self, value: i32)

Clears the stencil attachment of the target.
source§

fn clear_color_and_depth(&mut self, color: (f32, f32, f32, f32), depth: f32)

Clears the color and depth attachments of the target.
source§

fn clear_color_srgb_and_depth( &mut self, color: (f32, f32, f32, f32), depth: f32 )

Clears the color and depth attachments of the target. The color is in sRGB format.
source§

fn clear_color_and_stencil(&mut self, color: (f32, f32, f32, f32), stencil: i32)

Clears the color and stencil attachments of the target.
source§

fn clear_color_srgb_and_stencil( &mut self, color: (f32, f32, f32, f32), stencil: i32 )

Clears the color and stencil attachments of the target. The color is in sRGB format.
source§

fn clear_depth_and_stencil(&mut self, depth: f32, stencil: i32)

Clears the depth and stencil attachments of the target.
source§

fn clear_all(&mut self, color: (f32, f32, f32, f32), depth: f32, stencil: i32)

Clears the color, depth and stencil attachments of the target.
source§

fn clear_all_srgb( &mut self, color: (f32, f32, f32, f32), depth: f32, stencil: i32 )

Clears the color, depth and stencil attachments of the target. The color is in sRGB format.
source§

fn has_depth_buffer(&self) -> bool

Returns true if the surface has a depth buffer available.
source§

fn has_stencil_buffer(&self) -> bool

Returns true if the surface has a stencil buffer available.
source§

fn blit_whole_color_to<S>( &self, target: &S, target_rect: &BlitTarget, filter: MagnifySamplerFilter )where S: Surface,

Copies the entire surface to a target surface. See blit_color.
source§

fn fill<S>(&self, target: &S, filter: MagnifySamplerFilter)where S: Surface,

Copies the entire surface to the entire target. See blit_color.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.