Commit b7e4c43d authored by hrchilds's avatar hrchilds

merge OSPRay branch to trunk, taking changes related to OSPray, but not related to volume rendering

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@28149 18c085ea-50e0-402c-830e-de6fd14e8384
parent 3ef58bdb
......@@ -1146,6 +1146,13 @@ ELSE(VISIT_THREAD)
MESSAGE(STATUS "Threading for VisIt: OFF")
ENDIF(VISIT_THREAD)
IF(VISIT_OSPRAY)
ADD_DEFINITIONS(-DVISIT_OSPRAY)
MESSAGE(STATUS "OSPRAY for VisIt: ON")
ELSE(VISIT_OSPRAY)
MESSAGE(STATUS "OSPRAY for VisIt: OFF")
ENDIF(VISIT_OSPRAY)
#-----------------------------------------------------------------------------
# If we are doing a static build or the VTK Python wrappers do not exist:
# Disable python filters.
......
......@@ -64,6 +64,7 @@ bool avtCallback::nowinMode = false;
bool avtCallback::nowinInteractionMode = false;
bool avtCallback::swRendering = false;
bool avtCallback::useManta = false;
bool avtCallback::useOSPRay = false;
bool avtCallback::safeMode = false;
GlobalAttributes::BackendType avtCallback::backendType = GlobalAttributes::VTK;
......
......@@ -108,6 +108,9 @@ typedef void (*ResetTimeoutCallback)(void *, int);
// Cameron Christensen, Thursday, July 3, 2014
// Add backend type callback.
//
// Alok Hota, Tue Feb 23 19:10:32 PST 2016
// Add support for OSPRay.
//
// ****************************************************************************
class PIPELINE_API avtCallback
......@@ -145,6 +148,11 @@ class PIPELINE_API avtCallback
static bool UseManta(void)
{ return useManta; }
static void SetOSPRayMode(bool b)
{ useOSPRay = b; }
static bool UseOSPRay(void)
{ return useOSPRay; }
static void RegisterGetDatabaseCallback(
GetDatabaseCallback, void *);
static ref_ptr<avtDatabase> GetDatabase(const std::string &, int,
......@@ -186,6 +194,7 @@ class PIPELINE_API avtCallback
static bool nowinInteractionMode;
static bool swRendering;
static bool useManta;
static bool useOSPRay;
static bool safeMode;
static GlobalAttributes::BackendType backendType;
......
......@@ -57,6 +57,10 @@
#
#****************************************************************************/
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${VISIT_SOURCE_DIR}/avt/Plotter/OSPRay/CMake)
FIND_PACKAGE(OSPRay REQUIRED)
SET(VISIT_VTK_MANTA_SOURCES
Manta/vtkMantaPolyDataMapper.C
Manta/vtkMantaTexture.C
......@@ -71,6 +75,23 @@ Manta/vtkMantaManager.C
Manta/vtkMantaCubeAxesActor.C
)
SET(VISIT_VTK_OSPRAY_SOURCES
OSPRay/vtkOSPRay/vtkOSPRay.h
OSPRay/vtkOSPRay/vtkOSPRayActor.cxx
OSPRay/vtkOSPRay/vtkOSPRayCamera.cxx
OSPRay/vtkOSPRay/vtkOSPRayLight.cxx
OSPRay/vtkOSPRay/vtkOSPRayManager.cxx
OSPRay/vtkOSPRay/vtkOSPRayObjectFactory.cxx
OSPRay/vtkOSPRay/vtkOSPRayObjectFactory.h
OSPRay/vtkOSPRay/vtkOSPRayPolyDataMapper.cxx
OSPRay/vtkOSPRay/vtkOSPRayProperty.cxx
OSPRay/vtkOSPRay/vtkOSPRayRenderer.cxx
OSPRay/vtkOSPRay/vtkOSPRayTexture.cxx
OSPRay/vtkOSPRay/vtkOSPRayVolumeRayCastMapper.h
OSPRay/vtkOSPRay/vtkOSPRayVolumeRayCastMapper.cxx
OSPRay/vtkOSPRayModule.h
)
# create configuration file to pass off cmake options
CONFIGURE_FILE(
"${VISIT_SOURCE_DIR}/avt/Plotter/vtk/InitVTKRenderingConfig.h.in"
......@@ -160,6 +181,11 @@ IF(VISIT_MANTA)
SET(AVTPLOTTER_SOURCES ${AVTPLOTTER_SOURCES} ${VISIT_VTK_MANTA_SOURCES} )
ENDIF(VISIT_MANTA)
IF(VISIT_OSPRAY)
SET(AVTPLOTTER_SOURCES ${AVTPLOTTER_SOURCES} ${VISIT_VTK_OSPRAY_SOURCES} )
SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS}
${VISIT_SOURCE_DIR}/../../VTK-6.1.0/Rendering/Volume)
ENDIF(VISIT_OSPRAY)
INCLUDE_DIRECTORIES(
${VISIT_COMMON_INCLUDES}
......@@ -177,6 +203,8 @@ ${VISIT_SOURCE_DIR}/avt/Pipeline/Pipeline
${VISIT_SOURCE_DIR}/avt/Pipeline/Sinks
${VISIT_SOURCE_DIR}/avt/Pipeline/Sources
${VISIT_SOURCE_DIR}/avt/Plotter/Manta
${VISIT_SOURCE_DIR}/avt/Plotter/OSPRay
${VISIT_SOURCE_DIR}/avt/Plotter/OSPRay/vtkOSPRay
${VISIT_SOURCE_DIR}/avt/View
${VISIT_SOURCE_DIR}/visit_vtk/full
${VISIT_SOURCE_DIR}/visit_vtk/lightweight
......@@ -201,6 +229,14 @@ ADD_TARGET_DEFINITIONS(avtplotter_ser "${VTK_DEFINITIONS}")
IF(VISIT_MANTA)
TARGET_LINK_LIBRARIES(avtplotter_ser ${MANTA_TARGET_LINK_LIBRARIES})
ENDIF(VISIT_MANTA)
IF(VISIT_OSPRAY)
MESSAGE("OSPRAY_TARGET_LINK_LIBRARIES: " ${OSPRAY_TARGET_LINK_LIBRARIES})
MESSAGE("OSPRAY_LIBRARIES: " ${OSPRAY_LIBRARIES})
MESSAGE("OSPRAY_INCLUDE_DIRS: " ${OSPRAY_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(avtplotter_ser ${OSPRAY_TARGET_LINK_LIBRARIES}
${OSPRAY_LIBRARIES} ${VTK_LIBRARIES})
INCLUDE_DIRECTORIES(${OSPRAY_INCLUDE_DIRS} ${VISIT_SOURCE_DIR}/../../VTK-6.1.0/Parallel/Core)
ENDIF(VISIT_OSPRAY)
VISIT_INSTALL_TARGETS(avtplotter_ser)
#********************************* PARALLEL **********************************
......@@ -220,6 +256,10 @@ IF(VISIT_PARALLEL)
# LINK_DIRECTORIES(${ICET_LIBRARY_DIR})
#ENDIF(ICET_FOUND)
ENDIF(VISIT_MANTA)
IF(VISIT_OSPRAY)
TARGET_LINK_LIBRARIES(avtplotter_par ${OSPRAY_TARGET_LINK_LIBRARIES}
${OSPRAY_LIBRARIES})
ENDIF(VISIT_OSPRAY)
VISIT_INSTALL_TARGETS(avtplotter_par)
ENDIF(VISIT_PARALLEL)
......
## ======================================================================================= ##
## Copyright 2014-2015 Texas Advanced Computing Center, The University of Texas at Austin ##
## All rights reserved. ##
## ##
## Licensed under the BSD 3-Clause License, (the "License"); you may not use this file ##
## except in compliance with the License. ##
## A copy of the License is included with this software in the file LICENSE. ##
## If your copy does not contain the License, you may obtain a copy of the License at: ##
## ##
## http://opensource.org/licenses/BSD-3-Clause ##
## ##
## Unless required by applicable law or agreed to in writing, software distributed under ##
## the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ##
## KIND, either express or implied. ##
## See the License for the specific language governing permissions and limitations under ##
## limitations under the License. ##
## ======================================================================================= ##
###############################################################################
# Find OSPRay
# defines:
# OSPRAY_FOUND
# OSPRAY_INCLUDE_DIRS
# OSPRAY_LIBRARIES
# guess that OSPRay is installed in a peer directory (if in dev) or in a peer to the ParaView source
FIND_PATH(OSPRAY_DIR ospray
HINTS ${PROJECT_SOURCE_DIR}/../OSPRay ${PROJECT_SOURCE_DIR}/../../../OSPRay
DOC "OSPRay base directory"
)
IF(NOT OSPRAY_DIR)
MESSAGE("Could not find OSPRay base directory. Please set OSPRAY_DIR to the root of your local OSPRay git repository.")
ENDIF(NOT OSPRAY_DIR)
FIND_PATH(OSPRAY_CMAKE_DIR ospray.cmake
HINTS ${PROJECT_SOURCE_DIR}/../OSPRay/cmake ${PROJECT_SOURCE_DIR}/../../../OSPRay/cmake ${OSPRAY_DIR}/cmake
DOC "OSPRay cmake directory"
)
IF(NOT OSPRAY_CMAKE_DIR)
MESSAGE("Could not find OSPRay cmake directory. Please set OSPRAY_CMAKE_DIR to the cmake directory of your local OSPRay git repository, usually <root>/cmake.")
ENDIF(NOT OSPRAY_CMAKE_DIR)
FIND_PATH(OSPRAY_BUILD_DIR ospModelViewer
HINTS ${OSPRAY_DIR}/build ${PROJECT_SOURCE_DIR}/../OSPRay/build ${PROJECT_SOURCE_DIR}/../OSPRay ${PROJECT_SOURCE_DIR}/../../../OSPRay/build ${PROJECT_SOURCE_DIR}/../../../OSPRay
DOC "OSPRay build directory"
)
IF(NOT OSPRAY_BUILD_DIR)
MESSAGE("Could not find OSPRay build directory. Please set OSPRAY_BUILD_DIR to the directory where OSPRay was built.")
ENDIF(NOT OSPRAY_BUILD_DIR)
if (OSPRAY_BUILD_DIR)
SET(VISIT_OSPRAY ON TYPE BOOL)
LOAD_CACHE(${OSPRAY_BUILD_DIR} READ_WITH_PREFIX OSP_
OSPRAY_BUILD_MIC_SUPPORT
OSPRAY_BUILD_MPI_DEVICE
OSPRAY_COMPILER
OSPRAY_XEON_TARGET
)
SET(OSPRAY_INCLUDE_DIRS
${OSPRAY_DIR}
${OSPRAY_DIR}/ospray
${OSPRAY_DIR}/ospray/embree/common
${OSPRAY_DIR}/ospray/embree
${OSPRAY_DIR}/ospray/include
)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OSPRAY_CMAKE_DIR} ${OSPRAY_DIR})
# which compiler was used to build OSPRay
SET(OSPRAY_CC ${OSP_OSPRAY_COMPILER} CACHE STRING "OSPRay Compiler (ICC, GCC, CLANG)")
# whehter to build in MIC/xeon phi support
SET(OSPRAY_MIC ${OSP_OSPRAY_BUILD_MIC_SUPPORT} CACHE BOOL "Was OSPRay buit with Xeon Phi Support?")
# whehter to build in MIC/xeon phi support
SET(OSPRAY_MPI ${OSP_OSPRAY_BUILD_MPI_DEVICE} CACHE BOOL "Was OSPRay built with MPI Remote/Distributed rendering support?")
# the arch we're targeting for the non-MIC/non-xeon phi part of ospray
SET(OSPRAY_XEON_TARGET ${OSP_OSPRAY_XEON_TARGET} CACHE STRING "OSPRay target ISA on host (SSE,AVX,AVX2)")
ADD_DEFINITIONS(${OSPRAY_EMBREE_CXX_FLAGS})
endif(OSPRAY_BUILD_DIR)
# MESSAGE("ospray_dir ${OSPRAY_DIR}")
# SET(OSPRAY_DIR2 ${OSPRAY_DIR})
# INCLUDE(${OSPRAY_DIR}/cmake/ospray.cmake)
# SET(OSPRAY_DIR ${OSPRAY_DIR2})
# MESSAGE("ospray_dir ${OSPRAY_DIR}")
if(OSPRAY_CMAKE_DIR)
INCLUDE(${OSPRAY_CMAKE_DIR}/ospray.cmake)
INCLUDE(${OSPRAY_CMAKE_DIR}/mpi.cmake)
endif(OSPRAY_CMAKE_DIR)
SET(LIB_OSPRAY_EMBREE LIB_OSPRAY_EMBREE-NOTFOUND)
SET(LIB_OSPRAY LIB_OSPRAY-NOTFOUND)
FIND_LIBRARY(LIB_OSPRAY_EMBREE ospray_embree ${OSPRAY_BUILD_DIR})
FIND_LIBRARY(LIB_OSPRAY ospray ${OSPRAY_BUILD_DIR})
IF (OSPRAY_MIC)
# Xeon Phi specific build ops here
ENDIF(OSPRAY_MIC)
SET(OSPRAY_LIBRARIES
${LIB_OSPRAY_EMBREE}
${LIB_OSPRAY}
)
## ======================================================================================= ##
## Copyright 2014-2015 Texas Advanced Computing Center, The University of Texas at Austin ##
## ##
## Licensed under the BSD 3-Clause License, (the "License"); you may not use this file ##
## except in compliance with the License. ##
## A copy of the License is included with this software in the file LICENSE. ##
## If your copy does not contain the License, you may obtain a copy of the License at: ##
## ##
## http://opensource.org/licenses/BSD-3-Clause ##
## ##
## Unless required by applicable law or agreed to in writing, software distributed under ##
## the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ##
## KIND, either express or implied. ##
## See the License for the specific language governing permissions and limitations under ##
## limitations under the License. ##
## ======================================================================================= ##
###############################################################################
# Find OSPRay
# defines:
# OSPRAY_FOUND
# OSPRAY_INCLUDE_DIRS
# OSPRAY_LIBRARIES
# guess that OSPRay is installed in a peer directory
FIND_PATH(OSPRAY_DIR ospray
HINTS ${PROJECT_SOURCE_DIR}/../OSPRay
DOC "OSPRay base directory"
)
IF(NOT OSPRAY_DIR)
MESSAGE("Could not find OSPRay base directory. Please set OSPRAY_DIR to the root of your local OSPRay git repository.")
ENDIF(NOT OSPRAY_DIR)
FIND_PATH(OSPRAY_CMAKE_DIR ospray.cmake
HINTS ${PROJECT_SOURCE_DIR}/../OSPRay/cmake
DOC "OSPRay cmake directory"
)
IF(NOT OSPRAY_CMAKE_DIR)
MESSAGE("Could not find OSPRay cmake directory. Please set OSPRAY_CMAKE_DIR to the cmake directory of your local OSPRay git repository, usually <root>/cmake.")
ENDIF(NOT OSPRAY_CMAKE_DIR)
FIND_PATH(OSPRAY_BUILD_DIR ospModelViewer
HINTS ${PROJECT_SOURCE_DIR}/../OSPRay/build ${PROJECT_SOURCE_DIR}/../OSPRay
DOC "OSPRay build directory"
)
IF(NOT OSPRAY_BUILD_DIR)
MESSAGE("Could not find OSPRay build directory. Please set OSPRAY_BUILD_DIR to the directory where OSPRay was built.")
ENDIF(NOT OSPRAY_BUILD_DIR)
LOAD_CACHE(${OSPRAY_BUILD_DIR} READ_WITH_PREFIX OSP_
OSPRAY_BUILD_MIC_SUPPORT
OSPRAY_BUILD_MPI_DEVICE
OSPRAY_COMPILER
OSPRAY_XEON_TARGET
)
SET(OSPRAY_INCLUDE_DIRS
${OSPRAY_DIR}
${OSPRAY_DIR}/ospray
${OSPRAY_DIR}/ospray/embree/common
${OSPRAY_DIR}/ospray/embree
${OSPRAY_DIR}/ospray/include
)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OSPRAY_CMAKE_DIR} ${OSPRAY_DIR})
# which compiler was used to build OSPRay
SET(OSPRAY_CC ${OSP_OSPRAY_COMPILER} CACHE STRING "OSPRay Compiler (ICC, GCC, CLANG)")
# whehter to build in MIC/xeon phi support
SET(OSPRAY_MIC ${OSP_OSPRAY_BUILD_MIC_SUPPORT} CACHE BOOL "Was OSPRay buit with Xeon Phi Support?")
# whehter to build in MIC/xeon phi support
SET(OSPRAY_MPI ${OSP_OSPRAY_BUILD_MPI_DEVICE} CACHE BOOL "Was OSPRay built with MPI Remote/Distributed rendering support?")
# the arch we're targeting for the non-MIC/non-xeon phi part of ospray
SET(OSPRAY_XEON_TARGET ${OSP_OSPRAY_XEON_TARGET} CACHE STRING "OSPRay target ISA on host (SSE,AVX,AVX2)")
ADD_DEFINITIONS(${OSPRAY_EMBREE_CXX_FLAGS})
MESSAGE("ospray_dir ${OSPRAY_DIR}")
SET(OSPRAY_DIR2 ${OSPRAY_DIR})
INCLUDE(${OSPRAY_DIR}/cmake/ospray.cmake)
SET(OSPRAY_DIR ${OSPRAY_DIR2})
MESSAGE("ospray_dir ${OSPRAY_DIR}")
INCLUDE(${OSPRAY_DIR}/cmake/mpi.cmake)
SET(LIB_OSPRAY_EMBREE LIB_OSPRAY_EMBREE-NOTFOUND)
SET(LIB_OSPRAY LIB_OSPRAY-NOTFOUND)
FIND_LIBRARY(LIB_OSPRAY_EMBREE ospray_embree ${OSPRAY_BUILD_DIR})
FIND_LIBRARY(LIB_OSPRAY ospray ${OSPRAY_BUILD_DIR})
IF (OSPRAY_MIC)
# Xeon Phi specific build ops here
ENDIF(OSPRAY_MIC)
SET(OSPRAY_LIBRARIES
${LIB_OSPRAY_EMBREE}
${LIB_OSPRAY}
)
## ======================================================================================= ##
## Copyright 2014-2015 Texas Advanced Computing Center, The University of Texas at Austin ##
## All rights reserved. ##
## ##
## Licensed under the BSD 3-Clause License, (the "License"); you may not use this file ##
## except in compliance with the License. ##
## A copy of the License is included with this software in the file LICENSE. ##
## If your copy does not contain the License, you may obtain a copy of the License at: ##
## ##
## http://opensource.org/licenses/BSD-3-Clause ##
## ##
## Unless required by applicable law or agreed to in writing, software distributed under ##
## the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ##
## KIND, either express or implied. ##
## See the License for the specific language governing permissions and limitations under ##
## limitations under the License. ##
## ======================================================================================= ##
# vtkOSPRay is an interface from VTK's rendering classes to OSPRay,
# a "real time" Ray Tracer.
# It creates a library that includes OSPRay specific subclasses
# of VTK's rendering classes, Renderer, Camera, etc.
# These can be instantiated by name, or by using object factory overloading
# at post compile time (ie, set VTK_AUTOLOAD_PATH to vtkOSPRay's build
# directory and run a normal vtk app)
project(vtkOSPRay)
#Configure vtkOSPRay source proper ############################################
# Define a flag
if (BUILD_AGAINST_PARAVIEW)
add_definitions(-DVTKOSPRAY_FOR_PARAVIEW)
endif(BUILD_AGAINST_PARAVIEW)
# Set vtkOSPRay source files.
SET ( OSPRAY_CLASSES
vtkOSPRayActor.cxx
#vtkOSPRayRenderable.cxx
vtkOSPRayCamera.cxx
vtkOSPRayLight.cxx
vtkOSPRayManager.cxx
vtkOSPRayPolyDataMapper.cxx
vtkOSPRayProperty.cxx
vtkOSPRayRenderer.cxx
vtkOSPRayTestSource.cxx
vtkOSPRayTexture.cxx
vtkOSPRayVolumeRayCastMapper.h
vtkOSPRayVolumeRayCastMapper.cxx
vtkOSPRayPVLODVolume.cxx
)
IF (BUILD_AGAINST_PARAVIEW)
add_definitions(-DVTKOSPRAY_FOR_PARAVIEW)
# paraview uses its own LOD actor, put it in here
SET ( OSPRAY_CLASSES ${OSPRAY_CLASSES}
vtkOSPRayLODActor.cxx
vtkPVOSPRayRepresentation.cxx
vtkPVOSPRayRepresentation.h
vtkPVOSPRayOutlineRepresentation.cxx
vtkPVOSPRayOutlineRepresentation.h
# pnav - ParaView 4.3 is unhappy with some code in these, disabling for now
# something changed between the VTK in PV 4.1 and PV 4.3
vtkPVOSPRayImageVolumeRepresentation.cxx
vtkPVOSPRayImageVolumeRepresentation.h
vtkOSPRayCompositeMapper.cxx)
ENDIF (BUILD_AGAINST_PARAVIEW)
add_definitions(
-DvtkCommonCore_EXPORTS
-DvtkPVClientServerCoreRendering_EXPORTS
-DvtkRenderingVolume_EXPORTS
-DvtkPVVTKExtensionsRendering_EXPORTS
)
SET ( OSPRAY_SRCS
${OSPRAY_CLASSES}
# vtkOSPRayObjectFactory.cxx
)
set (${vtk-module}_NO_HeaderTest 1)
vtk_module_library(${vtk-module} ${OSPRAY_SRCS} ${MOCSrcs} ${UISrcs})
find_package(OSPRay)
# setup include paths
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/vtkOSPRay)
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/vtkOSPRay)
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/Base)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/Base)
# if(PARAVIEW_BUILD_QT_GUI)
# INCLUDE(${QT_USE_FILE})
# endif(PARAVIEW_BUILD_QT_GUI)
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})
INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIR}
)
if(VTK_USE_X)
vtk_module_link_libraries(${vtk-module}
LINK_PRIVATE ${OSPRAY_LIBRARIES} ${QT_LIBRARIES} ${X11_LIBRARIES} ${X11_Xt_LIB})
elseif(VTK_USE_COCOA)
vtk_module_link_libraries(${vtk-module} ${OSPRAY_LIBRARIES} ${QT_LIBRARIES} "-framework OpenGL -framework Cocoa")
target_link_libraries(${vtk-module} ${OSPRAY_LIBRARIES} ${QT_LIBRARIES} ${VTK_LIBRARIES})
endif()
# OSPRay_Core uses MMTime which is in it's own special library.
if(WIN32)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} LINK_PRIVATE Winmm)
endif()
#Examples ####################################################################
#IF ( BUILD_EXAMPLES )
#ADD_SUBDIRECTORY(Examples)
#ENDIF ( BUILD_EXAMPLES )
/*=========================================================================
Copyright (c) 2014 - 2015, Texas Advanced Computing Center, The University of Texas at Austin.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
Portions of this code are derived from the MantaView module developed at Los Alamos National Laboratory, which is licensed as follows:
/*=========================================================================
Copyright (c) 2007, Los Alamos National Security, LLC
All rights reserved.
Copyright 2007. Los Alamos National Security, LLC.
This software was produced under U.S. Government contract DE-AC52-06NA25396
for Los Alamos National Laboratory (LANL), which is operated by
Los Alamos National Security, LLC for the U.S. Department of Energy.
The U.S. Government has rights to use, reproduce, and distribute this software.
NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY,
EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE.
If software is modified to produce derivative works, such modified software
should be clearly marked, so as not to confuse it with the version available
from LANL.
Additionally, redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of Los Alamos National Security, LLC, Los Alamos National
Laboratory, LANL, the U.S. Government, nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY LOS ALAMOS NATIONAL SECURITY, LLC AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL LOS ALAMOS NATIONAL SECURITY, LLC OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
Portions of this code utilize the Visualization Toolkit (VTK) interface, which is licensed as follows:
/*=========================================================================
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
\ No newline at end of file
Binary file vtkOSPRay_src.tar matches
vtkOSPRay <a href="https://tacc.github.io/vtkOSPRay/">https://tacc.github.io/vtkOSPRay</a>
======
<h2>About</h2>
The base VTK code without ParaView is contained in the VTK directory and makes up vtkOSPRay. vtkOSPRay is a VTK module which utilizes Intel's OSPRay ray tracing framework (http://ospray.github.io) for rendering. This offers a performant CPU rendering package with enhanced image quality and includes plugins for the commonly used visualization tools ParaView and VisIt.
<h2>Building</h2>
vtkOSPRay is currently built as part of the pvOSPRay and visitOSPRay builds. A stand-alone library build process will be released soon.
## ======================================================================================= ##
## Copyright 2014-2015 Texas Advanced Computing Center, The University of Texas at Austin ##
## All rights reserved. ##
## ##
## Licensed under the BSD 3-Clause License, (the "License"); you may not use this file ##
## except in compliance with the License. ##
## A copy of the License is included with this software in the file LICENSE. ##
## If your copy does not contain the License, you may obtain a copy of the License at: ##
## ##
## http://opensource.org/licenses/BSD-3-Clause ##
## ##
## Unless required by applicable law or agreed to in writing, software distributed under ##
## the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ##
## KIND, either express or implied. ##
## See the License for the specific language governing permissions and limitations under ##
## limitations under the License. ##
## ======================================================================================= ##
set (_vtk_modules)
if(PARAVIEW_USE_MPI)
list(APPEND _vtk_modules vtkParallelMPI)
endif()
if (BUILD_AGAINST_PARAVIEW)
list(APPEND _vtk_modules vtkPVClientServerCoreRendering)
endif()
if (VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
message("GL2")
list(APPEND _vtk_modules vtkRenderingOpenGL2)
else()
message("GL1")
list(APPEND _vtk_modules vtkRenderingOpenGL)
endif()
vtk_module(vtkOSPRay
DEPENDS
vtkFiltersCore
vtkParallelCore
vtkFiltersHybrid
${_vtk_modules}
TEST_DEPENDS
vtkTestingRendering
vtkIOPLY
TEST_LABELS
PARAVIEW
EXCLUDE_FROM_WRAP_HIERARCHY
)
/* =======================================================================================
Copyright 2014-2015 Texas Advanced Computing Center, The University of Texas at Austin
All rights reserved.
Licensed under the BSD 3-Clause License, (the "License"); you may not use this file
except in compliance with the License.
A copy of the License is included with this software in the file LICENSE.
If your copy does not contain the License, you may obtain a copy of the License at:
http://opensource.org/licenses/BSD-3-Clause
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.
See the License for the specific language governing permissions and limitations under
limitations under the License.
pvOSPRay is derived from VTK/ParaView Los Alamos National Laboratory Modules (PVLANL)
Copyright (c) 2007, Los Alamos National Security, LLC
======================================================================================= */
// .NAME vtkOSPRay.h -
// .SECTION Description
//
#ifndef __vtkOSPRay_h
#define __vtkOSPRay_h
#include "ospray/ospray.h"
#include "vtkConfigure.h"
#include "vtkOSPRayModule.h"
#if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA))
# include <OpenGL/gl.h> // Include OpenGL API.
#else
#include "vtkOpenGL.h"
#endif
#define DEBUG(x) { std::cout << __PRETTY_FUNCTION__ << ":" << __LINE__ << " " << x << std::endl; }
#define USE_OSPRAY 1
#define USE_VBOS 0
#endif
/* =======================================================================================
Copyright 2014-2015 Texas Advanced Computing Center, The University of Texas at Austin
All rights reserved.
Licensed under the BSD 3-Clause License, (the "License"); you may not use this file
except in compliance with the License.
A copy of the License is included with this software in the file LICENSE.
If your copy does not contain the License, you may obtain a copy of the License at:
http://opensource.org/licenses/BSD-3-Clause
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.
See the License for the specific language governing permissions and limitations under
limitations under the License.
pvOSPRay is derived from VTK/ParaView Los Alamos National Laboratory Modules (PVLANL)
Copyright (c) 2007, Los Alamos National Security, LLC
======================================================================================= */
#include "ospray/ospray.h"
#define GL_GLEXT_PROTOTYPES
#include "vtkOSPRay.h"
#include "vtkOSPRayActor.h"
#include "vtkOSPRayManager.h"
#include "vtkOSPRayProperty.h"
#include "vtkOSPRayRenderer.h"
#include "vtkMapper.h"
#include "vtkDataSet.h"
#include "vtkObjectFactory.h"
#include "vtkRendererCollection.h"
#include "vtkTimerLog.h"
#include <map>
#include <algorithm>
#include "vtkInformation.h"
#include "vtkInformationVector.h"
vtkStandardNewMacro(vtkOSPRayActor);
//----------------------------------------------------------------------------
vtkOSPRayActor::vtkOSPRayActor()
{
this->OSPRayManager = NULL;
this->SortType = DYNBVH;
this->OSPRayModel = ospNewModel();
LastFrame=-1;
Renderable = NULL;
}
// now some OSPRay resources, ignored previously, can be de-allocated safely
//
vtkOSPRayActor::~vtkOSPRayActor()
{
if (this->OSPRayManager)
{