Skip to content
Snippets Groups Projects
  1. Mar 05, 2025
  2. Nov 08, 2024
  3. Oct 08, 2024
  4. Oct 07, 2024
  5. Oct 01, 2024
  6. Sep 28, 2024
  7. Sep 10, 2024
    • Jaswant Panchumarti (Kitware)'s avatar
      Fix corrupted OpenGL state in TestTextureBufferEmulation · b504802d
      Jaswant Panchumarti (Kitware) authored
      - Fixes flakiness in `TestTextureBufferEmulation`
      - The state should have been queried after render window is initialized, because the render window may delete and recreate the state in `vtkOpenGLRenderWindow::ReleaseGraphicsResources` which gets called from `vtkWin32OpenGLRenderWindow::CreateAWindow`
      b504802d
    • Jaswant Panchumarti (Kitware)'s avatar
      Enable runtime detection of GLX, EGL and OSMesa for OpenGL context · 04661f4b
      Jaswant Panchumarti (Kitware) authored
      - closes #18547
      - closes #19383
      - Use glad instead of glew for loading GL extension functions
      because GLEW has trouble using GLX and EGL in the same build.
      - Replaces the VTK::glew module with VTK::glad.
      - Removed the utility VTK::opengl module because it is unnecessary
      after the changes made to vtkOpenGLOptions.cmake
      - OpenGL is now loaded at runtime in desktop platforms.
      - For mobile and webassembly, when VTK_OPENGL_USE_GLES is ON,
      glad finds and links to the OpenGL::GLES3 library.
      - Support for OSMesa is always available from VTK. Users must make
      sure the libOSMesa.so or osmesa.dll is installed.
      - Support for EGL is always available from VTK in Linux and Android.
      Users must make sure libEGL is installed.
      - On platforms where multiple render window backends are possible, the
      vtkOpenGLRenderWindow is made the default factory override and it's
      New method implements runtime tests to determine what render windows
      can work. It basically constructs the platform implementation render
      window, attempts to initialize it and checks whether it was
      successfully intialized.
      - The X OpenGL render window class was updated to not call abort.
      It also print warnings instead of errors when it fails to open X
      display. This allows us to safely test support for GLX at runtime.
      - The new environment variable VTK_DEFAULT_OPENGL_WINDOW
      can optionally be used to force a render window subclass
      at runtime. It is useful to debug support for a fallback render
      window on different system configuration.
      - Remove usage of unnecessary CMake flag VTK_OPENGL_HAS_MESA.
      - Since there is no compile time depedency for OSMesa in VTK,
      this commit makes VTK act as if it can always use OSMesa,
      obviously when the system executing VTK code has osmesa installed.
      - ci scripts will be adjusted in next commits
      04661f4b
    • Jaswant Panchumarti (Kitware)'s avatar
      Run wasm tests without requiring threads · e964e05a
      Jaswant Panchumarti (Kitware) authored and Jaswant Panchumarti (Kitware)'s avatar Jaswant Panchumarti (Kitware) committed
      - this fixes flakiness in couple unit tests due to a spurious error that occurred when creating extra threads https://github.com/emscripten-core/emscripten/issues/12223 by completely disabling threads for unit tests.
      - sync XHR in `vtkPreloadDataFileIntoMemory` is apparently possible when the mimetype is `text/plain` - https://stackoverflow.com/a/63920556/7102809
      - Now, `vtkEmscripten.cmake` does not enable threads by default when `VTK_BUILD_TESTING` is `WANT` or `ON`.
      - Make `VTK_USE_PTHREADS` honor the value of `VTK_WEBASSEMBLY_THREADS`. This correctly configures code in VTK which assumes pthreads exist.
      - Remove pthread proxying and offscreen canvas link flags from unit tests as they're no longer required.
      e964e05a
  8. Jul 29, 2024
  9. Jul 17, 2024
  10. Jun 07, 2024
  11. Jun 03, 2024
    • David Thompson's avatar
      Significant vtkCellGrid changes. · 072b8fee
      David Thompson authored
      + Add a copy query and `vtkCellGrid::CopyStructure`; the virtual
        ShallowCopy and DeepCopy methods `vtkCellGrid` inherits now use it.
        But it is more flexible, allowing partial copies (such as a
        geometry-only copy) for filters that need it.
      + Refactor `vtkCellAttribute` so that DOF-sharing, function space,
        basis, and order may vary on a per-cell-type basis within the
        same `vtkCellGrid`. This adds `vtkCellAttribute::CellTypeInfo`
        that can be fetched from an attribute given a cell type.
      + Reorganize the basis functions and basis-gradient functions
        so the same code that performs numerical evaluation of each
        operator is available both on the CPU (via the C++
        `vtkDGOperatorEntry`) and the GPU (via the `vtkDGRenderResponder`).
      + Improve cell-grid external-surface computation.
        + Add an option to omit computation of sides for renderable cells.
          Without this option, a quadrilateral cell would have its edges
          output (either with the original cell if PreserveRenderableCells
          is true; or without the cell). This is not how ParaView's
          representations behave.
        + Add a new member to `vtkDGCell::Source` to hold a per-node array
          of "ghost" flags. This allows distributed-memory meshes to have
          properly-computed external surfaces (without internal faces rendered
          at process boundaries).
        + Add a new member to `vtkDGCell::Source` specifying whether the
          original cells or the sides should be extracted when processing
          a vtkSelectionNode that lists cell IDs.
      + Add a method to the base vtkDGCell to fetch sides of a side.
        All of the subclassed shapes implement this method and there is
        a test to validate (and compute for new shape subclasses) the
        lookup tables used by each shape.
        This is used to enhance the vtkDGSidesResponder so it can
        compute sides of sides in order to display "surface with edges"-style
        meshes, nodes/edges of boundary-condition side-sets, etc.
      + Simplify all cell-grid `normalToSideAt()` functions.
        This is used way to prevent shading of edges and vertices;
        the fragment shader can ignore the provided normal when rendering edges
        and vertices. And having a normal to a side (even when not uniquely
        defined) might be useful to shaders at some other point.
      + Add new DG test data.
        This includes
        + `dgEdges.dg` – a poly-line
        + `dgGhostHexahedra.dg` – the same as `dgHexahedra.dg` but with
          a ghost-node array that affects how the external surface is
          computed.
        + `dgMixed.dg` – contains cells of multiple types in the same
          cell-grid object.
        + `dgQuadraticQuadrilaterals.dg` – quadrilaterals with a quadratic
          shape function for testing tessellation control shaders.
      + vtkDGCell responders now use the new integer-tuple API for fetching
        connectivity data (so that arrays may be `vtkIntArray`,
        `vtkTypeInt32Array`, `vtkTypeInt64Array`, `vtkIdTypeArray`, or
        any other integer-valued array). This greatly simplifies
        logic for processing cells.
      + `vtkCellGridComputeSurface` has been renamed to `vtkCellGridComputeSides`.
        This breaks the VTK API but the cell-grid libraries were noted at
        the release of vtk 9.3.0 to be unstable.
        The filter is now more general and may output data not on the external
        surface of the model.
      + Fix coloring by vector magnitude/norm for cell-grids.
      + Fix the DG render-responder to use proper
        + colormap (preferring the mapper's if it exists and then the cell-attribute's if not);
        + attribute component (using the setting provided by the source of the colormap);
        + scalar range (paying attention to the colormap if requested).
      + Make `vtkCellGridSidesQuery::HashCombiner` available everywhere
        (as `Common/Core/vtkHashCombiner.h`).
        This will allow it to be used for upcoming changes to
        vtkCellGridResponders (to add caches based on an integer key).
      + Add cache data to cell-grid query-responders.
        This allows multiple query/filter instances to cache and share
        data so that data processed in them can share indices and other
        useful state.
        At this point, the cache must be manually managed.
      + Improved cell-grid range computation.
        + Now all component ranges (plus the L₁ and L₂ norms) are computed at once.
        + Range computation is parallelized.
        + HCurl and HDiv function spaces are sampled to obtain their range instead
          of simply taking the range of their coefficients. This is necessary
          since the coefficients are scaled by the inverse Jacobian of the
          shape attribute for the cell.
      + Add `vtkDGCell::GetParametricCenterOfSide()`.
        This is used for range queries as well as generating debug output.
      + Fix cached attribute-range lookup.
        The size of the per-component range vector was not tested properly,
        resulting in the cache nearly always being regarded as stale.
      + Fix rendering of cell-grid data.
        + HCurl/HDiv fields should not have data normalized by the determinant
          of the Jacobian.
        + Switch the pyramid data to use for rendering test.
          This uses a 19-node pyramid which does not have problems
          with surface normals like the 5- and 12-node versions.
        + Switch HCurl/HDiv basis functions to always be 3-D (even for 2-D cells).
          Because of the way shaders work, this is mandatory for now.
          Eventually, it would be nice to switch back.
      072b8fee
  12. May 22, 2024
    • Jaswant Panchumarti (Kitware)'s avatar
      Prep VTK C++ tests to run in browsers · bc3e52b6
      Jaswant Panchumarti (Kitware) authored
      - enablesr Rendering{Core, OpenGL}CxxTests in browser with vtk.wasm.
      - upgrades to CI can be found in the next commit.
      - all C++ tests are run with a python script Testing/WebAssembly/runner.py. This script coordinates the entire wasm testing process.
      - the runner.py script generates a html file per unit test at runtime, serves the html, js and wasm files with a http server and opens the URL in a browser. It implements some usefule POST/GET actions which enable C++ tests to preload/dump files and forward stdout/stderr/exit codes to the python process.
      - this commit introduces vtkEmscriptenTestUtilities which can load data files and baseline images required by a c++ unit test from a browser sandbox.
      bc3e52b6
    • Jaswant Panchumarti (Kitware)'s avatar
  13. Apr 17, 2024
  14. Apr 14, 2024
    • Jaswant Panchumarti (Kitware)'s avatar
      Support custom uniforms in opengl 2D polydata mapper · 96b01e3c
      Jaswant Panchumarti (Kitware) authored
      - allows specification of custom uniforms on a vtkActor2D's shader property.
      - this design follows the pattern from  the 3D vtkOpenGLPolyDataMapper.
      - finally, ensure texture coordinates are available as inputs for vertex and
        fragment shaders so that shader developers can use that for any purpose besides
        texture mapping while customizing shader code.
      96b01e3c
  15. Mar 30, 2024
  16. Mar 28, 2024
  17. Mar 27, 2024
  18. Mar 01, 2024
  19. Feb 07, 2024
    • Thomas Galland's avatar
      Update partial point and field data tests · 345cf74f
      Thomas Galland authored
      Previous `TestMultiBlockPartialArrayFieldData` was leading to false positive tests by using different geometry
      objects when no field data was attached. We update this test to use a `vtkCylinderSource` everywhere.
      Also update other similar tests for consistency.
      345cf74f
  20. Jan 17, 2024
  21. Jan 02, 2024
  22. Nov 14, 2023
  23. Nov 07, 2023
  24. Nov 05, 2023
  25. Nov 02, 2023
  26. Nov 01, 2023
  27. Oct 26, 2023
  28. Oct 17, 2023
  29. Sep 28, 2023
Loading