Commit Graph

1757 Commits

Author SHA1 Message Date
Kenneth Moreland
1e819c335f Remove uninitialized value warnings from PNGDecode
One of the dashboard compilers found a code path in PNGDecode where if
given a buffer too short for a header the info.width and info.height
were not initialized but their values still returned to the calling
function. This case does not really matter since an error is also
returned, but still technically incorrect. Fixed the problem by
initializing the width and height to 0 (which could help anyway if the
error is not properly checked).
2016-09-22 09:43:24 -06:00
Kenneth Moreland
c1de0e0746 Change VTKm_BUILD_RENDERING to VTKm_ENABLE_RENDERING
This makes the name more consistent with the names of the other VTK-m
CMake options.

Also changed the default to be ON. I do not see a big downside to
compiling the rendering library most of the time.
2016-09-21 14:38:00 -06:00
Dave Pugmire
a12b5eeae3 Fix compile errors. decl for memcpy required. 2016-09-20 11:03:25 -04: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
Dave Pugmire
36be354980 Merge branch 'glut-rendertest' into 'master'
Add glut rendering unittest.

Make the GLFW package variables advanced, and add it to the configure components.
Modify the other examples that use GLUT to use the configure components command.

See merge request !546
2016-09-13 14:20:04 -04:00
Kenneth Moreland
5455608c69 Remove boost::shared_ptr from rendering library
The remove boost::shared_ptr and the rendering library branches where
developed simultaneously, and thus some of the rendering library
implementation was using boost::shared_ptr like the old code. Bring up
to date with the rest of VTK-m by using std::shared_ptr instead.
2016-09-12 11:08:06 -06:00
Kenneth Moreland
e6686e8be7 Merge branch 'master' into rendering-library 2016-09-09 13:59:15 -06:00
Dave Pugmire
ffd2d0eac6 Add glut rendering unittest.
Make the GLFW package variables advanced, and add it to the configure components.
Modify the other examples that use GLUT to use the configure components command.
2016-09-09 15:33:34 -04:00
Robert Maynard
4f65da41b9 Remove usage of BOOST_CONCEPT_CHECK.
Instead manually verify the iterator type ourselves inside CopyInto.
2016-09-09 09:43:09 -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
0bcac3eb5d Remove "export" from virtual ArrayHandle destructor
One of the dashboards is complaining about the destructor implementation
not being used in a particular test build. I suspect it is because the
export macro has an inline, so I am trying removing it.
2016-09-08 16:06:09 -06:00
Robert Maynard
c2769b81e6 Move over from boost/random to c++11 random. 2016-09-08 17:10:39 -04:00
Kenneth Moreland
5c1352872a Remove VTKm_BUILD_SHARED_LIBS from Configure.h
It is not really necessary.
2016-09-08 07:58:04 -06:00
Kenneth Moreland
52838e9ed2 Make font factory arrays static for faster compilation
I noticed that Visual Studio was taking an insane amount of time to
compile BitmapFontFactory.cxx (~20 minutes). Following some suggestions
on stackoverflow (http://stackoverflow.com/questions/7893850/long-
compile-times-in-visual-c-2010-with-large-static-arrays) I changed the
arrays to be static const (something that is more viable when compiling
a library instead of header-only). The compile after this changes seems
basically immediate now.
2016-09-07 16:48:11 -06:00
Kenneth Moreland
7e0ec48cab Enable building shared libraries 2016-09-07 16:48:09 -06:00
Kenneth Moreland
17194ff3a6 Update OSMesa test for new rendering class interfaces 2016-09-07 16:48:07 -06:00
Kenneth Moreland
0dab3f2adf Fix warning about precision conversion 2016-09-07 16:48:05 -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
0c8919dc6a Add VTKM_OVERRIDE macro
This is using the C++11 override keyword to make the compiler check to
ensure that we are correctly overriding virtual methods when we mean to.
Currently this will not compile without C++11. However, we are planning
on moving to C++11 very soon, and we can fix the macro if we don't.
2016-09-07 16:47:39 -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
Robert Maynard
7d031f6187 Merge topic 'divide_by_zero_warnings'
912e2362 Adjust the range so we don't potential divide by zero.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !536
2016-09-07 14:07:13 -04:00
Kenneth Moreland
8cb2803b45 Merge branch 'precision-warnings' into 'master'
Fix precision warnings when FloatDefault is 64 bit

When VTKm_USE_DOUBLE_PRECISION is on (not the default), then
vtkm::FloatDefault is set to 64 bit values. There was some code that was
coded for 32 bit and never checked for 64 bit (on all compilers).

See merge request !526
2016-09-07 13:54:13 -04:00
Robert Maynard
96692134d2 Merge topic 'error_out_on_non_cxx11_compilers'
1881d375 Explicitly error out if vtk-m is used with a non c++11 compiler.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !532
2016-09-06 09:22:25 -04:00
Robert Maynard
912e236241 Adjust the range so we don't potential divide by zero. 2016-09-03 17:04:25 -04:00
Robert Maynard
310f1bc0a5 Correct missing std::time includes that vtkm::Math was hiding. 2016-09-02 14:44:30 -04:00
Robert Maynard
801473bc58 vtkm::Math now doesn't require boost 2016-09-02 13:32:26 -04:00
Robert Maynard
12a0afa773 Merge topic 'simplify_dispatcherdetail'
aff8c021 Remove DispatcherBaseDetailInvoke as it unnecessary with C++11.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !537
2016-09-02 08:21:25 -04:00
Robert Maynard
1a4d66b7e7 Merge topic 'remove_boost_shared_ptr'
c9834283 Remove vtkm usage of boost::shared and scoped pointers.
f81c42b9 Replace NULL with nullptr where applicable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !535
2016-09-01 16:15:55 -04:00
Robert Maynard
aff8c0211f Remove DispatcherBaseDetailInvoke as it unnecessary with C++11. 2016-09-01 10:41:45 -04:00
Robert Maynard
1881d375f5 Explicitly error out if vtk-m is used with a non c++11 compiler. 2016-09-01 09:45:43 -04:00
Robert Maynard
c9834283ea Remove vtkm usage of boost::shared and scoped pointers.
Now we are using c++11 shared_ptr and unique_ptr
2016-09-01 09:38:25 -04:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Robert Maynard
7acbdfa0ea Update StaticAssert.h to use the c++11 static_assert function 2016-09-01 09:35:43 -04:00
Robert Maynard
12810165bb Switch over to c++11 type_traits. 2016-08-31 16:11:26 -04:00
Kenneth Moreland
893f3115f2 Fix precision warnings when FloatDefault is 64 bit
When VTKm_USE_DOUBLE_PRECISION is on (not the default), then
vtkm::FloatDefault is set to 64 bit values. There was some code that was
coded for 32 bit and never checked for 64 bit (on all compilers).
2016-08-26 09:33:37 -06:00
Kenneth Moreland
4fd9ba7e11 Make glfw auto-terminate during testing
The UnitTestMapperGLFW test was coded to run in an interactive mode,
which was problematic when simply running the test. If no one was there
to exit the interactive window, the test would time out. This change
adds a "batch" mode that is on when run by ctest. The batch mode runs
through all configurations and exits.
2016-08-26 08:28:35 -06:00
Kenneth Moreland
b568dcee62 Merge branch 'incorrect-configure-in-rendering' into 'master'
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).

See merge request !519
2016-08-25 18:20:56 -04:00