code: def __init__(self, size):
      self.size = size
      self.fbo = FBO()
      self.color_tex = Texture()
      self.depth_tex = Texture()
      w, h = size
  
      with self.color_tex:
          gl.glTexImage2D(
              gl.GL_TEXTURE_2D,
              0,
              gl.GL_RGBA32F,
              w,
              h,
              0,
              gl.GL_RGBA,
              gl.GL_FLOAT,
              None,
          )
  
      with self.depth_tex:
          gl.glTexImage2D.wrappedOperation(
              gl.GL_TEXTURE_2D,
              0,
              gl.GL_DEPTH24_STENCIL8,
              w,
              h,
              0,
              gl.GL_DEPTH_STENCIL,
              gl.GL_UNSIGNED_INT_24_8,
              None,
          )
  
      with self.fbo:
          gl.glFramebufferTexture2D(
              gl.GL_FRAMEBUFFER,
              gl.GL_COLOR_ATTACHMENT0,
              gl.GL_TEXTURE_2D,
              self.color_tex,
              0,
          )
          gl.glFramebufferTexture2D(
              gl.GL_FRAMEBUFFER,
              gl.GL_DEPTH_STENCIL_ATTACHMENT,
              gl.GL_TEXTURE_2D,
              self.depth_tex,
              0,
          )
          gl.glViewport(0, 0, w, h)
          assert (
              gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER)
              == gl.GL_FRAMEBUFFER_COMPLETE
          )
  
      self.shader = Shader(
          vp_code="""
        #version 130
        uniform mat4 MVP;
        in vec4 data;
        out vec4 aData;
  
        void main() {
          aData = data;
          gl_Position = MVP * gl_Vertex;
        }
      """,
          fp_code="""
        #version 130
        in vec4 aData;
        out vec4 fragColor;
        void main() {
          fragColor = aData;
        }
      """,
      )
  
      self.fovy = 10.0
      self.aspect = 1.0 * w / h
      self.znear, self.zfar = 0.01, 100.0
  
imports: from contextlib import contextmanager
  import numpy
  import OpenGL.GL
  from .meshutil import perspective
label_desc: Use image node_id 1 to create a new MeshRenderer object from inherited base classes: object with example: obj = MeshRenderer(size)