[−][src]Struct web_glitz::rendering::FloatBuffer
Represents a color buffer that stores floating point values in a framebuffer for a custom render target.
Implementations
impl<F> FloatBuffer<F>
[src]
pub fn clear_command(
&self,
clear_value: [f32; 4],
region: Region2D
) -> ClearFloatCommand
[src]
&self,
clear_value: [f32; 4],
region: Region2D
) -> ClearFloatCommand
Returns a command that clears all pixel values in the region
to clear_value
.
Values outside the region are unaffected.
Examples
The following command will clear the entire buffer to a value of "transparent black":
let command = buffer.clear_command([0.0, 0.0, 0.0, 0.0], Region2D::Fill);
It's also possible to only clear a specific rectangular area of the buffer:
let command = buffer.clear_command([0.0, 0.0, 0.0, 0.0], Region2D::Area((0, 0), 100, 100));
See also Region2D.
Trait Implementations
impl<T, F> BlitColorCompatible<FloatBuffer<F>> for T where
T: BlitSource,
T::Format: FloatRenderable,
[src]
T: BlitSource,
T::Format: FloatRenderable,
impl<F> RenderingOutputBuffer for FloatBuffer<F> where
F: InternalFormat,
[src]
F: InternalFormat,
type Format = F
The type image storage format used by the buffer.
fn width(&self) -> u32
[src]
fn height(&self) -> u32
[src]
impl<T> ResolveColorCompatible<FloatBuffer<<T as ResolveSource>::Format>> for T where
T: ResolveSource,
[src]
T: ResolveSource,
Auto Trait Implementations
impl<F> RefUnwindSafe for FloatBuffer<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for FloatBuffer<F> where
F: Send,
F: Send,
impl<F> Sync for FloatBuffer<F> where
F: Sync,
F: Sync,
impl<F> Unpin for FloatBuffer<F>
impl<F> UnwindSafe for FloatBuffer<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<D, T> IntoBuffer<T> for D where
D: Borrow<T> + 'static,
T: Copy + 'static,
[src]
D: Borrow<T> + 'static,
T: Copy + 'static,
pub fn into_buffer<Rc>(Self, &Rc, BufferId, UsageHint) -> Buffer<T> where
Rc: RenderingContext + Clone + 'static,
[src]
Rc: RenderingContext + Clone + 'static,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,