/// Render the frame to a buffer of the size 320x240
Render the frame to a buffer of the size 320x240
Render the frame to a buffer of the size 320x240
pub fn render(&mut self, buffer: &mut [u32]) {
        let bgc = self.palette[self.bg as usize];
        for (buf, &fg) in buffer.iter_mut().zip(self.fg.iter()) {
            *buf = if fg != 0 { self.palette[fg as usize] } else { bgc };
        }
        self.vblank = true;
    }
pub fn render ( & mut self , buffer : & mut [ u32 ] ) { let bgc = self . palette [ self . bg as usize ] ; for ( buf , & fg ) in buffer . iter_mut ( ) . zip ( self . fg . iter ( ) ) { * buf = if fg != 0 { self . palette [ fg as usize ] } else { bgc } ; } self . vblank = true ; }
Render the frame to a buffer of the size 320x240
Render the frame to a buffer of the size 320x240
&mut self
buffer
&mut [u32]