Skip to content
Snippets Groups Projects
Commit b75bc715 authored by Ken Martin's avatar Ken Martin
Browse files

Update VTK to always use a framebuffer for rendering

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.
parent 77896059
No related branches found
No related tags found
1 merge request!6229Always framebuffer
Showing
with 289 additions and 532 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment