1. 23 Sep, 2016 1 commit
    • Kitware Robot's avatar
      Reindent using the reindentation script. · f830ff47
      Kitware Robot authored
      This commit reindents the code with the following utility:
      Utilities/Maintenance/vtk-reindent-code.py
      
      This utility changes the positions of the braces so that they are no
      longer indented relative to the code block they reside in.
      
      The bash command line used was the following:
      
      for d in Charts Common Deprecated Domains Examples Filters GUISupport \
               Geovis IO Imaging Infovis Interaction Parallel Rendering \
               Testing Views Web Wrapping; do
        for e in cxx cxx.in txx txx.in hxx hxx.in h h.in c c.in; do
          find "${d}" -name "*.${e}" -exec \
            python Utilities/Maintenance/vtk_reindent_code.py {} +
        done
      done
      f830ff47
  2. 28 Mar, 2016 1 commit
    • David Thompson's avatar
      Shift and scale VBO when precision requires it. · bc389ab2
      David Thompson authored
      This change identifies datasets that are far from their origins
      (relative to their bounds), which can result in precision problems
      when rendering. Problem datasets have their VBO modified and
      transforms concatenated to the view/display transforms sent to the
      shaders by the mapper to correct the problem.
      
      OpenGL drivers often use reduced-precision point coordinates; if the
      most significant bits are all used by a large translation then
      renderings are often misleading and frame-to-frame differences
      exaggerated. To counter this, this commit makes each VBO store shift
      and scale vectors generated when CreateVBO is called. If the origin
      is more than 10,000 bounding-box lengths away, transform the points
      as they are written to the VBO (this condition forces a slow-path where
      the VBO is generated, not copied directly from the vtkPoints array).
      When this occurs, the VBO presents a flag that informs the mapper to
      concatenate an inverse transform to the model-to-display and
      model-to-viewport matrices. Since these transformations include the
      camera projection and are done on the CPU with high precision, the
      translation is factored out of the data when the camera is nearby.
      
      This change also makes the VBO objects that the mappers own
      publicly accessible so that applications can override the behavior,
      either to manually set the shift and scale (as calling AppendVBO
      multiple times cannot compute a proper shift and scale) or to
      disable it should it cause issues.
      
      Thanks to Ken Martin for suggesting this approach.
      bc389ab2
  3. 08 Mar, 2016 1 commit
  4. 01 Jun, 2015 2 commits
    • Ken Martin's avatar
      Rebased to master · 844bdfc5
      Ken Martin authored
      844bdfc5
    • Ken Martin's avatar
      More cleanups · f1535309
      Ken Martin authored
      vtkgl::CellBO renamed vtkOpenGLHelper
      vtkgl::substitute moved to vtkShaderProgram::Substitute
      Creation of vtkOpenGLIndexBufferObject
      Creation of vtkOpenGLVertexBufferObject
      Move methods that were in vtkglVBOHelper into new classes
      Move IndexCount from CellBO to vtkOpenGLIndexBufferObject
      etc
      f1535309