fn calc_mse(&self) -> f32
    {
        if let Some(val) = self._mse.get()
        {
            val
        }
        else
        {
            self.s.fbo.bind();
            //unsafe{ gl::Viewport(0, 0, TEX_SIZE as i32, TEX_SIZE as i32) };
            self.draw();
            let val = self.s.mse.run(&self.s.tex_img, self.s.fbo.get_tex());
            self._mse.set(Some(val));
            val
        }
    }
// evaluated more than once, so we need to cache this
evaluated more than once, so we need to cache this
evaluated more than once so we need to cache this
fn calc_mse(&self) -> f32
    {
        if let Some(val) = self._mse.get()
        {
            val
        }
        else
        {
            self.s.fbo.bind();
            //unsafe{ gl::Viewport(0, 0, TEX_SIZE as i32, TEX_SIZE as i32) };
            self.draw();
            let val = self.s.mse.run(&self.s.tex_img, self.s.fbo.get_tex());
            self._mse.set(Some(val));
            val
        }
    }
fn calc_mse ( & self ) -> f32 { if let Some ( val ) = self . _mse . get ( ) { val } else { self . s . fbo . bind ( ) ; //unsafe{ gl::Viewport(0, 0, TEX_SIZE as i32, TEX_SIZE as i32) }; self . draw ( ) ; let val = self . s . mse . run ( & self . s . tex_img , self . s . fbo . get_tex ( ) ) ; self . _mse . set ( Some ( val ) ) ; val } }
evaluated more than once, so we need to cache this
evaluated more than once so we need to cache this
&self
&self