class_docstr: Provides a canvas to render to, using an FBO.
      
class_docstr_tok: ["Provides","a","canvas","to","render","to",",","using","an","FBO","."]
code: def _ensure_fbo(self):
      if self._fbo_size != self._physical_size:
          self._fbo_size = self._physical_size
          w, h = self._fbo_size
          if self._fbo is None:
              color_buffer = gloo.Texture2D((h, w, 4))
              depth_buffer = gloo.RenderBuffer((h, w))
              self._fbo = gloo.FrameBuffer(color_buffer, depth_buffer)
          else:
              self._fbo.resize((h, w))
  
file_path: vispy/vispy/app/backends/_offscreen_util.py
imports: from ..None import Application, Canvas
  from ...None import gloo
label_desc: Use image node_id 2 for calling the FrameBufferHelper obj's underlying member method code with example usage: obj._ensure_fbo() without return types