Commit Graph

191 Commits

Author SHA1 Message Date
Mark Kim
5827473abb Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2016-09-23 09:46:48 -04:00
Dave Pugmire
7a2874cf44 Add 1D support for uniform and rectilinear data. 2016-09-23 09:00:40 -04:00
Mark Kim
9100a58da4 glew undefs GLAPI and GLAPIENTRY. osmesa.h needs them. 2016-09-22 16:44:52 -04:00
Mark Kim
4076aef075 Ubuntu 16.04's OSMesa version 11.2.0 is compiled without gallium/llvmpipe, so it doesn't support GLSL 1.3 or higher. 2016-09-22 16:25:41 -04: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
Mark Kim
c99c05b6f0 Change glfw unit test to also test vbo uploading. 2016-09-15 13:56:50 -04:00
Mark Kim
bb7fe4ad8e It's possible that the length of shader compiler message to be less than
or equal to zero. If we don't check for that, it'll spit out garbage.
2016-09-15 13:55:16 -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
Mark Kim
ecf57f8f31 need glewInit. 2016-09-14 11:25:03 -04:00
Mark Kim
c216c98c57 Merge branch 'umaster' 2016-09-14 10:39:52 -04:00
Mark Kim
fbaee11da9 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 10:33:51 -04:00
Mark Kim
f293c5a0bc Merge branch 'glut-unittest' 2016-09-14 09:19:57 -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
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
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
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
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
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
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
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Mark Kim
387d2a6a76 Stop copying the data in the render call. Instead, upload it on the first
call and then never upload again.

RenderTest: overload the Render function to pass in a Mapper.
UnitTestMapperGLFW: global variable for the MapperGL to pass into RenderTest::Render

MapperGL: Creating the VBO/VAO is now wrapped in check to see if the data's
already been loaded.

Moved some variables to class scope.
2016-08-29 04:33:14 -06: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
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
Kenneth Moreland
1b69a83423 Don't add tests from parent directories
The testing subdirectories were including the tests from the parent
directory. I believe this was a copy-paste error from the tests
originally all being in one file (where the unit_tests variable had all
tests appended) and then moved to subdirectories where they should not
be appended.
2016-08-25 13:20:40 -06:00
Kenneth Moreland
8fd0768b39 Add RenderTest.h to configure scripts
The SourceInBuild was failing because of that.
2016-08-25 10:34:40 -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
e920659ab8 Don't need to set uni_tests. 2016-08-19 14:27:40 -06:00
Mark Kim
5fbc55fa52 Check to see if osmesa or egl were found before adding testing. 2016-08-18 14:04:37 -06:00
Mark Kim
a5c3be294e Not specifying GLFW compatibility mode and OpenGL version allows for
annotation.
2016-08-12 19:29:01 -06:00
Mark Kim
cd27a71e2b Some Windows specific problems:
snprintf is incorrect pre-VS2013.
There are iterator issues (see 2121a36f)
far is a reserved #defined in windows *sigh*
2016-08-12 18:33:27 -06: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
Robert Maynard
31138293f9 Pass Fields and CoordinateSystems to Dispatcher::Invoke
Now that we can handle scheduling Fields and CoordinateSystems, do
2016-08-05 15:26:17 -04:00