Commit Graph

65 Commits

Author SHA1 Message Date
Manish Mathai
b727377fd5 Refactoring 2017-08-21 18:21:44 -07:00
Manish Mathai
7e95269ce0 Refactoring wireframing code 2017-08-21 18:21:44 -07:00
Manish Mathai
5738e895ce Wireframe rendering 2017-08-21 18:21:37 -07:00
Manish Mathai
af2acc5736 Implements a simple line renderer using Xialin Wu's algorithm
The algorithm is parallelized using a custom Mapper and Canvas class.
It is parallelized over the expected pixels that will be colored,
blending with any previous color value. This does not use the depth buffer
and hence will naively overrwite all pixels while drawing a line segment.
2017-08-16 11:02:42 -07:00
Dave Pugmire
b23564a526 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into pics_unittests 2017-08-10 16:18:18 -04:00
Matt Larsen
dba99744ce Merge topic 'rendering_pipeline'
2b5e8e9f Removing debug statements
0459913a Multi canvas rendering
35877cd9 Adding missing file
b1e3688b multi-canvas working for ray tracer + volume renderer
33af0fec composing ray tracer and volume renderer is successful. Still need a strategy for the background color.
8e5f309e adding support in rendering triangulator for cell set permutation
92fde35b fixing depth

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !862
2017-08-06 17:02:51 -04:00
Matt Larsen
33af0fec65 composing ray tracer and volume renderer is successful. Still need a strategy for the background color. 2017-08-04 09:24:05 -07:00
James
6106e24026 Fix CMake line. 2017-07-28 13:48:48 -04:00
James
c7ef96601b Commenting in rendering CMakeLists. 2017-07-28 13:40:39 -04:00
James
6b59b01e14 Adding color lines, view annotations, line color labels. 2017-07-28 13:31:19 -04:00
Dave Pugmire
3759887aed Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2017-07-28 10:07:37 -04:00
Matt Larsen
c9ce558497 Merge topic 'fix_for_rt_lib'
adced368 Adding private targert link library to fix undefined symbols in ubuntu

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !830
2017-07-10 10:36:19 -04:00
Matt Larsen
adced36814 Adding private targert link library to fix undefined symbols in ubuntu 2017-07-10 07:34:51 -07:00
Matt Larsen
a2b3f80356 Cleaning up rendering headers and moving structured volume renderer into cxx file 2017-07-08 13:48:38 -07:00
Matt Larsen
630e871ea7 refactoring ray tracing and adding new renderer 2017-06-17 14:28:45 -07:00
Dave Pugmire
69f9125663 Experiment with speeding up the GetHexahedronClassification. 2017-03-28 09:28:03 -04:00
Kenneth Moreland
a3573117de Compile RuntimeDeviceTracker.cxx with CUDA when appropriate
The RuntimeDeviceTracker.cxx contains a library method that queries the
CUDA device, which only works if compiled as a CUDA source file.

This set up will allow code that is not compiled with CUDA use a
RuntimeDeviceTracker with other code that does use CUDA.
2017-02-22 16:18:23 -07:00
Robert Maynard
8035b526a8 Update the CMake components to have the concept of backends.
Now components are labeled as devices, and therefore allow other components
to link to only backends. We also have done the same thing for rendering.
2017-01-27 10:03:53 -05:00
Robert Maynard
a16f9fedbe Reduce the amount of vtables that vtkm::rendering produce. 2017-01-16 09:17:38 -05:00
Ben Boeckel
e06a998e5b Merge topic 'render_1D'
8a93ecc4 code alignment tweaks.
6fa448b5 Remove the 1D camera. 1D plots will use a 2D camera.
52aa9b9a Fix some compile errors.
23d8d585 Add explicit 1D rendering. Also added some data model suport.
db522c4c Add GetCanvas calls to the mapper classes.
87b1cdca cleanup. Remove some compiler warnings.
d38e6270 Support for 1D rendering.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !616
2016-12-09 09:34:11 -05:00
Kenneth Moreland
0772a157fd Revert "Don't build vtkm_rendering if we can't find opengl"
There are many rendering classes that do not rely on OpenGL. We really
want to be able to use this functionality on systems that do not have
OpenGL. That is a big part of the point.

This reverts commit c75feb74bb6add43e1be9a42a9bf4bf205b97c39.
2016-11-23 12:14:44 -07:00
Dave Pugmire
87b1cdcacf cleanup. Remove some compiler warnings. 2016-11-23 13:45:03 -05:00
Dave Pugmire
d38e627057 Support for 1D rendering. 2016-11-23 10:48:22 -05:00
Robert Maynard
c75feb74bb Don't build vtkm_rendering if we can't find opengl. 2016-10-31 15:16:36 -04:00
Kenneth Moreland
797d30d7bb Remove unnecessary link from vtkm_rendering to glfw
There is no code in the rendering library that uses GLFW. (GLFW is
currently only used directly by tests and examples.) This adds
unnecessary link dependencies that can only hurt us later.
2016-10-22 16:03:16 -06:00
Kenneth Moreland
0ca69cf65f Merge topic 'osmesa-option'
123bc8b6 Add a configuration error if OSMesa was not found
0a61085d Do not load OpenGL libraries if OSMesa already loaded
640e92c7 Add VTKm_ENABLE_OSMESA option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !548
2016-09-17 10:11:55 -04:00
Kenneth Moreland
123bc8b6e2 Add a configuration error if OSMesa was not found
If VTKm_ENABLE_OSMesa was on but OSMesa was not found, CMake would just
give a status update but happily configure. This change checks for the
condition where VTKm_ENABLE_OSMesa is on but OSMesa was not configured
correctly and raises an error in this case.
2016-09-14 16:04:37 -06:00
Mark Kim
7cfc119999 Demo.cxx: MapperRayTracer is no longer a templated class.
UnitTestMapperEGL.cxx: MapperGL is no longer a templated class.
UnitTestMapperGLFW.cxx: strmp needs cstring
rendering/CMakeLists.txt: need to append egl_sources to sources.
2016-09-14 15:58:45 -04:00
Kenneth Moreland
77ecfbeb78 Explicitly implement constructors and destructors
The clang compiler was running into linker errors constructors of
classes with virtual methods that were inline and destructors that were
not declared at all. In this case, the compiler was not creating
everything needed by a virtual table and the link died.
2016-09-08 17:08:17 -06:00
Kenneth Moreland
22c6741152 Add View to rendering library
To get rid of some templates, I added the ability to create new
instances of mappers and canvases without knowing their type.
2016-09-07 16:48:04 -06:00
Kenneth Moreland
26671e9fd6 Add WorldAnnotator to rendering library 2016-09-07 16:48:01 -06:00
Kenneth Moreland
219d6c02a1 Add TextureGL to rendering library
Also hide internals and other GL-ness from the interface.
2016-09-07 16:48:00 -06:00
Kenneth Moreland
c446f1bc7a Add TextAnnotation to rendering library
Also made the TextAnnotation classes conform better to VTK-m coding
style. Specifically, changed the order of words in subclass names (e.g.
TextAnnotationBillboard instead of BillboardTextAnnotation) and broke
out each subclass into its own header/source files.
2016-09-07 16:47:58 -06:00
Kenneth Moreland
d4afc12add Add Actor and Scene to rendering library
Also took away some unnecessary templates.
2016-09-07 16:47:56 -06:00
Kenneth Moreland
668f93a66b Move Mappers to rendering library
Also changed the mappers to not be templated on the device adapter.
Instead, use TryExecute to determine the device adapter at runtime.
2016-09-07 16:47:52 -06:00
Kenneth Moreland
111850ef08 Use TryExecute within the rendeirng library
When things in the rendering library need to execute things in parallel
(outside of another rendering library like OpenGL) it should run it on
available parallel devices. This means using TryExecute to attempt on
whatever devices may be available. It also means that some of the
sources must be compiled with CUDA's nvcc. To enable this, made a code
wrapping mechanism to compile within a .cu file.
2016-09-07 16:47:50 -06:00
Kenneth Moreland
d8ca9f0125 Add ColorBarAnnotation and ColorTable to rendering library 2016-09-07 16:47:48 -06:00
Kenneth Moreland
1073fdede1 Move Canvas classes to rendering library 2016-09-07 16:47:46 -06:00
Kenneth Moreland
e20648b845 Add Camera code to rendering library 2016-09-07 16:47:44 -06:00
Kenneth Moreland
2c34c1ac9d Move BitmapFont code to library 2016-09-07 16:47:42 -06:00
Kenneth Moreland
07df53d7d1 Move AxisAnnotation classes to rendering library 2016-09-07 16:47:40 -06:00
Kenneth Moreland
ea8602d882 Create configuration for rendering library
I have noticed at least on my windows machine that source code that uses
the rendering package is taking a long time to compile. The rendering
library does not rely much on templates and more on virtual methods.
Thus, it is a good candidate for moving to a library so that it need be
compiled only once.

This sets up the configure scripts to create the library. There is also
a simple port of one class to the library. More will follow.
2016-09-07 16:47:35 -06:00
Kenneth Moreland
7f8ea09f88 Fix configuration of dependent rendering libraries
The VTKmConfigureComponents.cmake file has lots of careful configuration
of many of VTK-m components and dependent libraries (like OpenGL,
OSMesa, etc.) that takes care of several corner cases. The configuration
is consolidated here so that it can be consistent across the many
directories in VTK-m as well as other projects that use VTK-m.

Recent changes to the configuration in rendering circumvented these and
directly tried to configure dependent rendering libraries. This is wrong
(and more importantly broke my OSX build).
2016-08-25 14:44:30 -06:00
Dave Pugmire
6f30b786f5 Add GLFW unit test.
Simplify the test code with a class templated on mapper, canvas and view.
2016-08-24 16:22:48 -04:00
Dave Pugmire
78f368486c Did a chmod on these files that had the execute bit set. 2016-08-24 13:08:23 -04:00
Mark Kim
7bb3e89e87 Split EGL and OSMesa into separate directories. libGL and libOSMesa do not play well together. 2016-08-08 21:57:38 -04:00
Kenneth Moreland
1d0eac6301 Update some configuration to new components 2016-06-21 18:03:25 -06:00
Kenneth Moreland
a8384d6b7a Unify configuration for VTK-m build and packages
Have VTK-m eat its own dog food when it comes to its configuration. Load
the same configuration for building VTK-m as would be loaded (more or
less) when using find_package(VTKm) in an external project.

This includes adding lots more components to the packages so that all the
setup (e.g. OpenGL, TBB, etc.) can be set up correctly. It is also a
significant change to how these components are declared. The component
configuration is simplified a bit and unified in a single file.
2016-06-21 18:03:23 -06:00
Dave Pugmire
af1daf2f66 Add support for offscreen rendering with EGL. Added new class CanvasEGL, and a test. 2016-06-15 09:48:45 -04:00
Kenneth Moreland
b01e8391b4 Consolidate functionality in Canvas classes
Move some of the management of the width, height, and buffers to the base
Canvas class. Also, when it makes sense, get the width and height from
the rendering system.

Also changed the color buffer to be a Vec so that you don't have to
manage array offsets by hand.

All of these changes snowballed from the observation that the glut
example did not properly enable the depth buffer.
2016-06-09 12:07:55 -06:00