Skip to content
  • Ken Martin's avatar
    Update VTK to always use a framebuffer for rendering · b75bc715
    Ken Martin authored
    Modify VTK so that the render process always uses a
    framebuffer. The basic approach is that render() calls
    
    - Start (pushes the current bindings + binds fb)
    - DoStereoRender
      - StereoUpdate()
      - StereoMidpoint() (blits for crystal eyes)
      - StereoComplete()
    - End (pops the bindings)
    - CopyResultingFrame
      - stereo pixel processing
      - Frame() (blits the resulting frame)
    
    The depth buffer will be 32 bit fixed unless a
    stencil buffer is requested. Then it will be
    24 depth + 8 stencil. If multisamples is requested
    VTK will try to create a framebuffer with multisamples.
    
    Only one color buffer is created. For stereo rendering
    the StereoMidpoint must be used to read or blit the left
    eye prior to starting rendering of the right eye.
    
    If you want color or depth values from an external
    codebase to be used in the rendering process you must
    write them into the framebuffer prior to calling Render()
    in VTK. See vtkExternalOpenGLRenderWindow for an example
    of this.
    
    Probably still some optimization that will happen in a
    further topic once this settles as there are some old
    methods that no longer really are needed.
    b75bc715