Minor doc improvement
This commit is contained in:
parent
703773f35d
commit
f19740003f
|
@ -236,10 +236,14 @@ impl Pixels {
|
||||||
/// .texture_format(TextureFormat::R8Unorm)
|
/// .texture_format(TextureFormat::R8Unorm)
|
||||||
/// .build()?;
|
/// .build()?;
|
||||||
///
|
///
|
||||||
|
/// // Clear the pixel buffer
|
||||||
/// let frame = pixels.get_frame();
|
/// let frame = pixels.get_frame();
|
||||||
/// for pixel in frame {
|
/// for pixel in frame {
|
||||||
/// *pixel = 0;
|
/// *pixel = 0;
|
||||||
/// }
|
/// }
|
||||||
|
///
|
||||||
|
/// // Draw it to the `SurfaceTexture`
|
||||||
|
/// pixels.render();
|
||||||
/// # Ok::<(), pixels::Error>(())
|
/// # Ok::<(), pixels::Error>(())
|
||||||
/// ```
|
/// ```
|
||||||
pub fn get_frame(&mut self) -> &mut [u8] {
|
pub fn get_frame(&mut self) -> &mut [u8] {
|
||||||
|
|
Loading…
Reference in a new issue