1. 18 Jul, 2017 1 commit
    • Utkarsh Ayachit's avatar
      Cleanup offscreen rendering support in VTK. · d0e7aab3
      Utkarsh Ayachit authored
      This commit cleans up offscreen rendering support in VTK. This includes
      several changes.
      
      1. It makes EGL support independent of onscreen GL
         support. It's now possible to enable EGL and GLX in same build of
         VTK, for example, so long as the two use shared GL-dispatch
         mechanism.  Previously, EGL could not be enabled together with GLX
         (i.e.  `VTK_USE_X` set to ON). These changes allow for that
         configuration.
      
      2. `VTK_USE_OFFSCREEN_EGL` is replaced by `VTK_OPENGL_HAS_EGL`.
          This is consistent with `VTK_OPENGL_HAS_OSMESA` flag. And also
          in similar vein to changes to `FindOpenGL.cmake` where EGL
          becomes a component of `find_package(OpenGL)`.
      
      3. `VTK_EGL_DEVICE_INDEX` has been replaced by
         `VTK_DEFAULT_EGL_DEVICE_INDEX` since it only affect the default
         value, and doesn't preclude users from manually specifying the
         device index.
      
      4. `VTK_USE_OFFSCREEN` has been replaced by
         `VTK_DEFAULT_RENDER_WINDOW_OFFSCREEN`, since similar to `3`
         this option was only intended to affect the default value.
      
      5. Simplified `FindEGL.cmake`. Apps don't need to link against
         `gldispatch` library and hence removed it and created an
         imported target to simplify use.
      
      6. For all changes to CMake variables, we put out `DEPRECATION`
         messages if old variables are used.
      
      7. When `VTK_USE_X` and `VTK_OPENGL_HAS_EGL` or
         `VTK_OPENGL_HAS_OSMESA` in ON, following things happen:
         i.   The object-factory simply returns the X-based (or
              onscreen) render window i.e. `vtkXOpenGLRenderWindow`.
         ii.  To create one of the offscreen render windows, one can
              manually instantiate them e.g. by explicitly
              instantiating `vtkEGLRenderWindow`.
              `vtkXOpenGLRenderWindow` has implementation to swap to
              OSMesa if `SetUseOffscreen(true)` is called.
         iii. As soon any off-screen features are enabled, `glew`
              uses the offscreen library APIs to get OpenGL function pointers
              irrespective of how the active context was initialized.
      d0e7aab3
  2. 08 Jul, 2017 1 commit
    • Bill Lorensen's avatar
      COMP: Mac issues with odd-sized baseline images · 36a75873
      Bill Lorensen authored
      NSWindow's behaviour round sizes *up* to even integral sizes.
      
      This seems to be related to the limitation for Macs with retina
      display - they can only create windows with width and height with even
      number of pixels.
      
      If you try to create a window with height or width
      with odd number of pixels you end up with height or width with even
      number of pixels.
      36a75873
  3. 13 Apr, 2017 1 commit
    • Sean McBride's avatar
      Fixed various warnings from new cppcheck 1.78 · 25058c30
      Sean McBride authored
      Types of warnings:
      - mismatch between parameters names in declaration vs definition
      - make certain parameters references, or const references
      - checking array index after its use
      - prefer preincrement
      - change return type of operator=
      
      There are some very minor API chages here (const/reference).
      25058c30
  4. 22 Jan, 2017 1 commit
    • Sean McBride's avatar
      const improvements to APIs and internal usage · 8b32854b
      Sean McBride authored
      - Made a few APIs' params const
      - Changed many usages of the evil GetBounds() to expect a const
        return value, even though it does not (yet?) return const
      - Slightly changed return values of vtkTextActor3D::GetBounds()
        to return its own ivar instead of its ImageActor's
      8b32854b
  5. 16 Jan, 2017 1 commit
  6. 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
  7. 20 Sep, 2016 1 commit
  8. 12 Sep, 2016 1 commit
    • Haocheng LIU's avatar
      Rewrite all public&private dependency in module.cmake file · 6e113ad4
      Haocheng LIU authored
      The current dependency relationship in vtk is unclear and misleading.
      This MR tries to rewrite them based on header files inclusion of headers
      and source files in each module. Corner cases are considered and
      modules are sorted in alphabetical order to facilitate future reference.
      See details in my gitlab python based script project. In future we can continue
      using this script to clean the VTK Dependency easily from
      time to time.
      6e113ad4
  9. 06 May, 2016 1 commit
    • David C. Lonie's avatar
      Replace SafeDownCast calls on arrays with vtkArrayDownCast. · 0d71a308
      David C. Lonie authored
      SafeDownCast performs a series of virtual calls and string comparisons,
      which is quite slow, especially when used in worker functions.
      
      vtkArrayDownCast will switch between SafeDownCast and the more
      efficient FastDownCast (only available for common vtkAbstractArray
      subclasses) depending on whether or not FastDownCast is defined for
      the specific array type.
      0d71a308
  10. 08 Mar, 2016 1 commit
  11. 22 Feb, 2016 1 commit
  12. 14 Jan, 2016 1 commit
  13. 06 Jan, 2016 1 commit
  14. 21 Dec, 2015 2 commits
  15. 02 Nov, 2015 3 commits
  16. 26 Oct, 2015 1 commit
  17. 23 Oct, 2015 1 commit
  18. 08 Sep, 2015 1 commit
    • Dan Lipsa's avatar
      BUG: OSMESA configuration flags can cause link errors. · 3b6810ff
      Dan Lipsa authored
      This fixes:
         VTK_OPENGL_HAS_OSMESA on
         VTK_USE_X             on
         caused link errors in Rendering/OpenGL as some of the cxx
         files contained code ifdef using VTK_OPENGL_HAS_OSMESA instead of
         VTK_USE_OSMESA
      
      In the past, one could link against both MESA and OSMESA and use OSMESA only
      for off-screen rendering. In recent versions of MESA this is not the case anymore.
      3b6810ff
  19. 31 Aug, 2015 1 commit
    • Dan Lipsa's avatar
      COMP: Add logic to selectively use OpenGL or OSMesa. · f09903e4
      Dan Lipsa authored
      Use vtkOpenGL.cmake to decide to use (LINK_PRIVATE) OpenGL or Offscreen Mesa.
      OpenGL is now LINK_PRIVATE, so additional libraries and tests need to include OpenGL.
      Include the following in your CMakeLists.txt:
      
      include(vtkOpenGL)
      vtk_opengl_link(${module})
      
      for every ${module} that uses OpenGL. This takes care of include directories and
      linking of proper libraries.
      f09903e4
  20. 09 Apr, 2015 2 commits
    • David C. Lonie's avatar
      Update baselines. · 1942a721
      David C. Lonie authored
      1942a721
    • David C. Lonie's avatar
      Remove the RenderingFreeTypeOpenGL module. · 4f7460a5
      David C. Lonie authored
      This is not supported by the new OpenGL2 backend, and doesn't support
      new text features, like MathText, FontConfig, or custom font files.
      
      It only implements vtkTextMapper, which now will use a texture-based
      implementation, similar to vtkTextActor and friends.
      4f7460a5
  21. 16 Mar, 2015 1 commit
  22. 03 Feb, 2015 1 commit
  23. 11 Dec, 2014 2 commits
    • Cory Quammen's avatar
      Handle coloring by field data · a07731a2
      Cory Quammen authored
      Some level of support was previously available for coloring by field
      data, but this was restricted to drawing triangle strips. This patch
      adds another mode to coloring by field data that enables coloring the
      entire data set by a particular tuple in the field data. The field
      data tuple gets mapped through the color map, and that color is used
      to color the entire data set. The default behavior for triangle strips
      is retained by setting this tuple index to -1, the default value.
      
      The motivation for this change is to make it possible to color blocks
      in a multi-block dataset according to a value in that block's field
      data array, e.g., an initial condition, block ID, etc. Vector values
      (arrays with more than one component) are fully supported.
      
      Several other improvements were also made:
      
      - Added test for existing capability of coloring by field data.
      
      - Added test for coloring by tuple of field data.
      
      - Modified vtkMapper::GetScalarModeAsString() to return
        string for field data scalar mode.
      
      - Fixed vtkDataSetSurfaceFilter::UnstructuredGridExecute(...) and
        vtkUnstructuredGridGeometryFilter::RequestData(...)
        to pass field data through to output
      
      Change-Id: I0d97e84ec77e7ea01ca1b1350acce73cb6c4c15b
      a07731a2
    • Sean McBride's avatar
      Unified mixed unsigned char/int usage to bool · b54bce1d
      Sean McBride authored
      Fixes -Wconversion warnings that pointed out the mixed use of
      unsigned char and int in these APIs.
      
      Switched to bool since the comments describe it as a 'flag'
      
      This is an API change, but shouldn't cause much trouble I hope.
      
      Change-Id: I0ded5ea638c646f9e5c7aa792fe93784cb9025b4
      b54bce1d
  24. 04 Nov, 2014 1 commit
    • Dave DeMarle's avatar
      fix a bug in value painting for cell arrays · 78108633
      Dave DeMarle authored
      I wasn't rendering the correct values because I didn't have the right
      ids. With small data the cellarray and polydata indices happened to
      be the same. In general they won't be.
      
      Change-Id: Id1186c8fab3b0ba0ff2e640a6fd3d6075f690516
      78108633
  25. 29 Oct, 2014 2 commits
    • Ken Martin's avatar
      Restore file that was accidentally changed · 4362136d
      Ken Martin authored
      Change-Id: I262b5e05433c1677c5c8fc5e14aaabc07ec0d68c
      4362136d
    • Ken Martin's avatar
      Get render passes working in OpenGL2 · f15f4bfe
      Ken Martin authored
      Add in a bunch of render pass classes that were previously removed.
      At the same time get the GaussianBlurPass and SobelGradientMagnitude
      classes to work with the new backend.
      This code now exercises a few methods that previously were not
      previously exercised. As such I made some significant changes to those
      methods to make them fit in better with the new architecture.
      
      In the process of testing I did find a calculation error in the old
      code related to cmoputing camera angles. I fixed this issue in both the
      old and new rendering backend.
      
      The tests for these passes were modified to not use the DepthPeelingPass
      as that pass has not been converted yet.
      
      Change-Id: Ie40231385291aa06848034460817b171e60f7a53
      f15f4bfe
  26. 01 Oct, 2014 1 commit
  27. 25 Sep, 2014 1 commit
  28. 24 Sep, 2014 1 commit
    • Dave DeMarle's avatar
      Add render mode in which values are drawn as recoverable 24bit colors. · f8c5c678
      Dave DeMarle authored
      With this you can pick an array component and draw that directly
      on the screen. Afterward, if you know the min and max, you read pixel
      values back and get a hold of the value at each pixel.
      
      TODO:
      * Lots of type conversion here, and in the end only using 24 bits
      of resolution. When and if we need more accuracy, flesh out
      the extensible conversion operator part.
      * Surface selection is based on the same concept (ident buffer)
      but that was written before VTK has extensible rendering (painters
      and passes). Eventually selection should be reimplemented to use
      this.
      * Would be great to demonstrate render into background followed by
      mouse overs.
      
      Change-Id: I44608759278c37c8250f957d596f3f4149382bbb
      f8c5c678
  29. 22 Jul, 2014 2 commits
    • Sean McBride's avatar
      Changed public API of vtkGPUInfo to return vtkTypeUInt64 for memory sizes. · 7399f6db
      Sean McBride authored
      It previously used vtkIdType which could be 32 bit even on 64 bit systems.
      Fixes overflow in the case of 32 bit vtkIdType and GPUs with more
      than 2 GiB of memory.
      
      Also changed "MB" to "MiB" in test output, since it's base 2.
      
      Change-Id: I23ba36647596cc49e3a65fab5784e18c021070e1
      7399f6db
    • Utkarsh Ayachit's avatar
      BUG #14828: Keep surface color from interacting with scalar color. · daf8c6e7
      Utkarsh Ayachit authored
      When using scalar coloring, if vtkScalarsToColorsPainter decided to use
      a texture for mapping the scalars to colors, we ended up with the
      surface color bleeding through the texture. This commit ensures that
      such bleeding is avoided.
      
      We don't simply use glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE,
      GL_REPLACE), since that results in the diffuse highlights being lost.
      By enabling GL_COLOR_MATERIAL and calling glColor3f(1,1,1), we follow
      the same lighting/coloring path as we would when not using the texture
      for scalar coloring.
      
      Change-Id: I9c4db15dd0db699d5d045fa7ae27696d18828988
      daf8c6e7
  30. 18 Jun, 2014 2 commits
  31. 06 Jun, 2014 1 commit
  32. 30 May, 2014 1 commit