Commit 1c30b799 authored by Nicholas Milef's avatar Nicholas Milef

ENH: Added Vulkan renderer

parent 45cad214
......@@ -121,5 +121,6 @@ ExternalProject_Add( ${PROJECT_NAME}
-D${PROJECT_NAME}_USE_OMNI:BOOL=${${PROJECT_NAME}_USE_OMNI}
-D${PROJECT_NAME}_USE_ODE:BOOL=${${PROJECT_NAME}_USE_ODE}
-DODE_ROOT_DIR:PATH=${ODE_ROOT_DIR}
-D${PROJECT_NAME}_USE_Vulkan:BOOL=${${PROJECT_NAME}_USE_Vulkan}
DEPENDS ${${PROJECT_NAME}_DEPENDENCIES}
)
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_add_external_project( glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git
GIT_TAG 3.2.1
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
RELATIVE_INCLUDE_PATH ""
DEPENDENCIES ""
#VERBOSE
)
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_add_external_project( gli
GIT_REPOSITORY https://github.com/g-truc/gli.git
GIT_TAG 0.8.2
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
RELATIVE_INCLUDE_PATH ""
DEPENDENCIES ""
#VERBOSE
)
#-----------------------------------------------------------------------------
# Add External Project
#-----------------------------------------------------------------------------
include(imstkAddExternalProject)
imstk_add_external_project( glm
GIT_REPOSITORY https://github.com/g-truc/glm.git
GIT_TAG 0.9.8.3
INSTALL_COMMAND ${SKIP_STEP_COMMAND}
RELATIVE_INCLUDE_PATH ""
DEPENDENCIES ""
#VERBOSE
)
#-----------------------------------------------------------------------------
# Vulkan renderer
#-----------------------------------------------------------------------------
message(STATUS "Superbuild - Vulkan SDK => ENABLING Vulkan renderer")
if(NOT DEFINED VulkanSDK_ROOT_DIR)
set(VulkanSDK_ROOT_DIR "$ENV{VULKAN_SDK}" CACHE PATH "Path to Vulkan SDK install directory." FORCE)
endif()
if(NOT EXISTS ${VulkanSDK_ROOT_DIR})
message(FATAL_ERROR "\nCan not support Vulkan renderer without Vulkan SDK.\nSet VulkanSDK_ROOT_DIR to Vulkan SDK installation directory.\n\n")
endif()
#-----------------------------------------------------------------------------
# Find path
#-----------------------------------------------------------------------------
find_path(VulkanSDK_INCLUDE_DIR
NAMES
vulkan/vulkan.h
PATHS
${VulkanSDK_ROOT_DIR}/Include
)
mark_as_advanced(VulkanSDK_INCLUDE_DIR)
#-----------------------------------------------------------------------------
# Find library
#-----------------------------------------------------------------------------
find_library(VulkanSDK_LIBRARY
NAMES
vulkan-1
)
mark_as_advanced(VulkanSDK_LIBRARY)
set(VulkanSDK_LIBRARIES ${VulkanSDK_LIBRARY})
\ No newline at end of file
#-----------------------------------------------------------------------------
# Find path
#-----------------------------------------------------------------------------
find_path(glfw_INCLUDE_DIR
NAMES
GLFW/glfw3.h
PATH_SUFFIXES
include
)
mark_as_advanced(glfw_INCLUDE_DIR)
message(STATUS "glfw_INCLUDE_DIR : ${glfw_INCLUDE_DIR}")
#-----------------------------------------------------------------------------
# Find library
#-----------------------------------------------------------------------------
find_library(glfw_LIBRARY
NAMES
glfw3
)
mark_as_advanced(glfw_LIBRARY)
#message(STATUS "glfw_LIBRARY : ${glfw_LIBRARY}")
set(glfw_LIBRARIES ${glfw_LIBRARY})
#-----------------------------------------------------------------------------
# Find package
#-----------------------------------------------------------------------------
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(glfw
REQUIRED_VARS
glfw_INCLUDE_DIR
glfw_LIBRARIES)
#-----------------------------------------------------------------------------
# If missing target, create it
#-----------------------------------------------------------------------------
if(GLFW_FOUND AND NOT TARGET glfw)
add_library(glfw INTERFACE IMPORTED)
set_target_properties(glfw PROPERTIES
INTERFACE_LINK_LIBRARIES "${glfw_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${glfw_INCLUDE_DIR}"
)
endif()
#-----------------------------------------------------------------------------
# Find path
#-----------------------------------------------------------------------------
find_path(gli_INCLUDE_DIR
NAMES
gli/gli.hpp
)
mark_as_advanced(gli_INCLUDE_DIR)
message(STATUS "gli_INCLUDE_DIR : ${gli_INCLUDE_DIR}")
#-----------------------------------------------------------------------------
# Find package
#-----------------------------------------------------------------------------
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(gli
REQUIRED_VARS
gli_INCLUDE_DIR)
#-----------------------------------------------------------------------------
# If missing target, create it
#-----------------------------------------------------------------------------
if(GLM_FOUND AND NOT TARGET gli)
add_library(gli INTERFACE IMPORTED)
set_target_properties(gli PROPERTIES
INTERFACE_LINK_LIBRARIES "${gli_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${gli_INCLUDE_DIR}"
)
endif()
#-----------------------------------------------------------------------------
# Find path
#-----------------------------------------------------------------------------
find_path(glm_INCLUDE_DIR
NAMES
glm/glm.hpp
)
mark_as_advanced(glm_INCLUDE_DIR)
message(STATUS "glm_INCLUDE_DIR : ${glm_INCLUDE_DIR}")
#-----------------------------------------------------------------------------
# Find package
#-----------------------------------------------------------------------------
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(glm
REQUIRED_VARS
glm_INCLUDE_DIR)
#-----------------------------------------------------------------------------
# If missing target, create it
#-----------------------------------------------------------------------------
if(GLM_FOUND AND NOT TARGET glm)
add_library(glm INTERFACE IMPORTED)
set_target_properties(glm PROPERTIES
INTERFACE_LINK_LIBRARIES "${glm_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${glm_INCLUDE_DIR}"
)
endif()
......@@ -88,6 +88,14 @@ if(${PROJECT_NAME}_SUPERBUILD)
imstk_define_dependency(Uncrustify)
endif()
option(${PROJECT_NAME}_USE_Vulkan "Use the custom Vulkan renderer." OFF)
if(${PROJECT_NAME}_USE_Vulkan)
imstk_define_dependency(glfw)
imstk_define_dependency(glm)
imstk_define_dependency(gli)
endif()
if(WIN32)
imstk_define_dependency(PThreads)
imstk_define_dependency(Libusb) #for VRPN
......@@ -196,6 +204,20 @@ endif(Uncrustify_EXECUTABLE)
find_package( Assimp REQUIRED )
include_directories( ${Assimp_INCLUDE_DIRS} )
if( ${PROJECT_NAME}_USE_Vulkan )
# glfw
find_package(glfw)
include_directories( ${glfw_INCLUDE_DIR} )
# glm
find_package(glm)
include_directories( ${glm_INCLUDE_DIR} )
# gli
find_package(gli)
include_directories( ${gli_INCLUDE_DIR} )
endif()
# g3log
find_package( g3log REQUIRED )
include_directories( ${g3log_INCLUDE_DIR} )
......@@ -238,6 +260,15 @@ else()
remove_definitions( -DiMSTK_USE_ODE )
endif()
# Vulkan
if(${PROJECT_NAME}_USE_Vulkan)
find_package( VulkanSDK )
include_directories( ${VulkanSDK_INCLUDE_DIR} )
add_definitions( -DiMSTK_USE_Vulkan )
else()
remove_definitions( -DiMSTK_USE_Vulkan )
endif()
# Google Test
if(BUILD_TESTING)
find_package( GoogleTest REQUIRED )
......
......@@ -58,7 +58,38 @@ imstk_add_data(${PROJECT_NAME} ${FILE_LIST})
#-----------------------------------------------------------------------------
# Shaders
#-----------------------------------------------------------------------------
file(COPY ${CMAKE_SOURCE_DIR}/Source/Rendering/VTKShaders
DESTINATION ${PROJECT_BINARY_DIR}/Shaders)
file(COPY ${CMAKE_SOURCE_DIR}/Source/Rendering/VTKShaders
DESTINATION ${CMAKE_PROGRAM_PATH}/Shaders)
\ No newline at end of file
function(compileShaders sourceShader binaryShader)
add_custom_command(
TARGET Sandbox
COMMAND glslangvalidator -V ${PROJECT_BINARY_DIR}/Shaders/VulkanShaders/${sourceShader} -o ${PROJECT_BINARY_DIR}/Shaders/VulkanShaders/${binaryShader})
endfunction()
if( iMSTK_USE_Vulkan )
file(COPY ${CMAKE_SOURCE_DIR}/Source/Rendering/VulkanRenderer/VulkanShaders
DESTINATION ${PROJECT_BINARY_DIR}/Shaders)
# Mesh shaders
compileShaders(Mesh/mesh_vert.vert Mesh/mesh_vert.spv)
compileShaders(Mesh/mesh_tesc.tesc Mesh/mesh_tesc.spv)
compileShaders(Mesh/mesh_tese.tese Mesh/mesh_tese.spv)
compileShaders(Mesh/mesh_frag.frag Mesh/mesh_frag.spv)
# Post processing shaders
compileShaders(PostProcessing/HDR_tonemap_frag.frag PostProcessing/HDR_tonemap_frag.spv)
compileShaders(PostProcessing/postprocess_vert.vert PostProcessing/postprocess_vert.spv)
compileShaders(PostProcessing/postprocess_frag.frag PostProcessing/postprocess_frag.spv)
compileShaders(PostProcessing/sss_frag.frag PostProcessing/sss_frag.spv)
compileShaders(PostProcessing/composite_frag.frag PostProcessing/composite_frag.spv)
compileShaders(PostProcessing/bloom_threshold_frag.frag PostProcessing/bloom_threshold_frag.spv)
compileShaders(PostProcessing/blur_horizontal_frag.frag PostProcessing/blur_horizontal_frag.spv)
compileShaders(PostProcessing/blur_vertical_frag.frag PostProcessing/blur_vertical_frag.spv)
compileShaders(PostProcessing/bloom_threshold_frag.frag PostProcessing/bloom_threshold_frag.spv)
file(COPY ${PROJECT_BINARY_DIR}/Shaders/VulkanShaders
DESTINATION ${CMAKE_PROGRAM_PATH}/Shaders)
else( iMSTK_USE_Vulkan )
file(COPY ${CMAKE_SOURCE_DIR}/Source/Rendering/VTKRenderer/VTKShaders
DESTINATION ${PROJECT_BINARY_DIR}/Shaders)
file(COPY ${CMAKE_SOURCE_DIR}/Source/Rendering/VTKRenderer/VTKShaders
DESTINATION ${CMAKE_PROGRAM_PATH}/Shaders)
endif()
......@@ -218,6 +218,79 @@ void testMshAndVegaIO()
sdk->startSimulation(true);
}
void testVTKTexture()
{
// Parse command line arguments
std::string inputFilename = iMSTK_DATA_ROOT "/ETI/resources/OperatingRoom/cloth.obj";
std::string texturename = iMSTK_DATA_ROOT "/ETI/resources/TextureOR/cloth.jpg";
std::string inputFilename1 = iMSTK_DATA_ROOT "/ETI/resources/OperatingRoom/bed1.obj";
std::string texturename1 = iMSTK_DATA_ROOT "/ETI/resources/TextureOR/bed-1.jpg";
vtkSmartPointer<vtkOBJReader> reader =
vtkSmartPointer<vtkOBJReader>::New();
reader->SetFileName(inputFilename.c_str());
reader->Update();
vtkSmartPointer<vtkOBJReader> reader1 =
vtkSmartPointer<vtkOBJReader>::New();
reader1->SetFileName(inputFilename1.c_str());
reader1->Update();
// Visualize
vtkSmartPointer<vtkPolyDataMapper> mapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(reader->GetOutputPort());
vtkSmartPointer<vtkPolyDataMapper> mapper1 =
vtkSmartPointer<vtkPolyDataMapper>::New();
mapper1->SetInputConnection(reader1->GetOutputPort());
vtkSmartPointer<vtkActor> actor =
vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);
vtkSmartPointer<vtkActor> actor1 =
vtkSmartPointer<vtkActor>::New();
actor1->SetMapper(mapper1);
vtkSmartPointer<vtkJPEGReader> jpgReader =
vtkSmartPointer<vtkJPEGReader>::New();
jpgReader->SetFileName(texturename.c_str());
jpgReader->Update();
vtkSmartPointer<vtkTexture> texture = vtkSmartPointer<vtkTexture>::New();
texture->SetInputConnection(jpgReader->GetOutputPort());
texture->InterpolateOn();
actor->SetTexture(texture);
vtkSmartPointer<vtkJPEGReader> jpgReader1 =
vtkSmartPointer<vtkJPEGReader>::New();
jpgReader1->SetFileName(texturename1.c_str());
jpgReader1->Update();
vtkSmartPointer<vtkTexture> texture1 = vtkSmartPointer<vtkTexture>::New();
texture1->SetInputConnection(jpgReader1->GetOutputPort());
texture1->InterpolateOn();
actor1->SetTexture(texture1);
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
renderer->AddActor(actor);
renderer->AddActor(actor1);
renderer->SetBackground(.3, .6, .3); // Background color green
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow);
renderWindowInteractor->Start();
}
void testMultiObjectWithTextures()
{
// SDK and Scene
......@@ -930,7 +1003,7 @@ void testIsometricMap()
// Start simulation
sdk->setActiveScene(geometryMapTest);
sdk->startSimulation(VTKRenderer::Mode::DEBUG);
sdk->startSimulation(imstk::Renderer::Mode::DEBUG);
}
void testTetraTriangleMap()
......@@ -2499,14 +2572,19 @@ void testScreenShotUtility()
cam1->setPosition(Vec3d(-5.5, 2.5, 32));
cam1->setFocalPoint(Vec3d(1, 1, 0));
#ifndef iMSTK_USE_Vulkan
auto viewer = std::dynamic_pointer_cast<VTKViewer>(sdk->getViewer());
auto screenShotUtility
= std::dynamic_pointer_cast<VTKScreenCaptureUtility>(viewer->getScreenCaptureUtility());
// Set up for screen shot
sdk->getViewer()->getScreenCaptureUtility()->setScreenShotPrefix("screenShot_");
// Create a call back on key press of 'b' to take the screen shot
sdk->getViewer()->setOnCharFunction('b', [&](VTKInteractorStyle* c) -> bool
viewer->setOnCharFunction('b', [&](VTKInteractorStyle* c) -> bool
{
sdk->getViewer()->getScreenCaptureUtility()->saveScreenShot();
screenShotUtility->saveScreenShot();
return false;
});
#endif
// Run
sdk->setActiveScene(sceneTest);
......@@ -3293,11 +3371,11 @@ int main()
/*------------------
Test physics
------------------*/
testPbdVolume();
//testPbdVolume();
testPbdCloth();
//testPbdCollision();
testPbdFluidBenchmarking();
testPbdFluid();
//testPbdFluidBenchmarking();
//testPbdFluid();
//testDeformableBody();
//testDeformableBodyCollision();
//liverToolInteraction();
......
......@@ -80,6 +80,7 @@ AssimpMeshIO::readMeshData(const std::string& filePath)
// Vertex positions
StdVectorOfVec3d positions(numVertices);
for (unsigned int i = 0; i < numVertices; i++)
{
auto positionX = importedMesh->mVertices[i].x;
......@@ -90,6 +91,7 @@ AssimpMeshIO::readMeshData(const std::string& filePath)
// Triangles
std::vector<SurfaceMesh::TriangleArray> triangles(numTriangles);
for (unsigned int i = 0; i < numTriangles; i++)
{
auto triangle = importedMesh->mFaces[i];
......@@ -152,7 +154,6 @@ AssimpMeshIO::readMeshData(const std::string& filePath)
mesh->setDefaultTCoords("tCoords");
mesh->setPointDataArray("tCoords",UVs);
}
return mesh;
}
}
......@@ -50,6 +50,24 @@ RenderMaterial::setDisplayMode(const DisplayMode displayMode)
m_modified = true;
}
bool
RenderMaterial::getTessellated() const
{
return m_tessellated;
}
void
RenderMaterial::setTessellated(const bool tessellated)
{
if (tessellated == m_tessellated)
{
return;
}
m_tessellated = tessellated;
m_stateModified = true;
m_modified = true;
}
float
RenderMaterial::getLineWidth() const
{
......
......@@ -55,6 +55,12 @@ public:
DisplayMode getDisplayMode() const;
void setDisplayMode(const DisplayMode displayMode);
///
/// \brief Get/Set tessellated
///
bool getTessellated() const;
void setTessellated(const bool tessellated);
///
/// \brief Get/Set line width or the wireframe
///
......@@ -129,6 +135,7 @@ protected:
// State
DisplayMode m_displayMode = DisplayMode::SURFACE;
bool m_tessellated = false;
float m_lineWidth = 1.0;
float m_pointSize = 1.0;
bool m_backfaceCulling = true; ///< For performance, uncommon for this to be false
......
......@@ -40,4 +40,10 @@ Texture::getPath() const
{
return m_path;
}
bool
Texture::getMipmapsEnabled()
{
return m_mipmapsEnabled;
}
}
\ No newline at end of file
......@@ -30,9 +30,6 @@ namespace imstk
///
/// \class Texture
///
/// \brief iMSTK texture class. There are a few texture types that
/// dictate how texture are to be treated.
///
class Texture
{
public:
......@@ -46,9 +43,12 @@ public:
SPECULAR,
ROUGHNESS,
METALNESS,
SUBSURFACE_SCATTERING,
AMBIENT_OCCLUSION,
CAVITY,
CUBEMAP,
IRRADIANCE_CUBEMAP,
RADIANCE_CUBEMAP,
NONE
};
......@@ -74,10 +74,17 @@ public:
///
const std::string getPath() const;
protected:
///
/// \brief Get type
///
bool getMipmapsEnabled();
protected:
Type m_type; ///< Texture type
std::string m_path; ///< Texture file path
// Helps with texture aliasing (and a little with performance)
bool m_mipmapsEnabled = true;
};
}
......
#-----------------------------------------------------------------------------
# Create target
#-----------------------------------------------------------------------------
set(VTK_H_FILES
VTKRenderer/imstkVTKRenderer.h
VTKRenderer/imstkVTKTextureDelegate.h
VTKRenderer/imstkVTKCustomPolyDataMapper.h
VTKRenderer/RenderDelegate/imstkVTKCubeRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKLineMeshRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKPlaneRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKSphereRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKCapsuleRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKSurfaceMeshRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKTetrahedralMeshRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKHexahedralMeshRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKCylinderRenderDelegate.h
VTKRenderer/RenderDelegate/imstkVTKPointSetRenderDelegate.h)
set(VTK_CPP_FILES
VTKRenderer/imstkVTKRenderer.cpp
VTKRenderer/imstkVTKTextureDelegate.cpp
VTKRenderer/imstkVTKCustomPolyDataMapper.cpp
VTKRenderer/RenderDelegate/imstkVTKCubeRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKLineMeshRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKPlaneRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKSphereRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKCapsuleRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKSurfaceMeshRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKTetrahedralMeshRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKHexahedralMeshRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKCylinderRenderDelegate.cpp
VTKRenderer/RenderDelegate/imstkVTKPointSetRenderDelegate.cpp)
set(VULKAN_H_FILES
VulkanRenderer/imstkVulkanRenderer.h
VulkanRenderer/RenderDelegate/imstkVulkanCapsuleRenderDelegate.h
VulkanRenderer/RenderDelegate/imstkVulkanCubeRenderDelegate.h
VulkanRenderer/RenderDelegate/imstkVulkanPlaneRenderDelegate.h
VulkanRenderer/RenderDelegate/imstkVulkanRenderDelegate.h
VulkanRenderer/RenderDelegate/imstkVulkanSphereRenderDelegate.h
VulkanRenderer/RenderDelegate/imstkVulkanSurfaceMeshRenderDelegate.h
VulkanRenderer/imstkVulkanMaterialDelegate.h
VulkanRenderer/imstkVulkanTextureDelegate.h
VulkanRenderer/imstkVulkanMemoryManager.h
VulkanRenderer/imstkVulkanValidation.h
VulkanRenderer/imstkVulkanBuffer.h
VulkanRenderer/imstkVulkanUniformBuffer.h
VulkanRenderer/imstkVulkanVertexBuffer.h
VulkanRenderer/imstkVulkanFramebuffer.h
VulkanRenderer/PostProcessing/imstkVulkanPostProcess.h
VulkanRenderer/PostProcessing/imstkVulkanPostProcessingChain.h)
set(VULKAN_CPP_FILES
VulkanRenderer/imstkVulkanRenderer.cpp
VulkanRenderer/RenderDelegate/imstkVulkanCapsuleRenderDelegate.cpp
VulkanRenderer/RenderDelegate/imstkVulkanCubeRenderDelegate.cpp
VulkanRenderer/RenderDelegate/imstkVulkanPlaneRenderDelegate.cpp
VulkanRenderer/RenderDelegate/imstkVulkanRenderDelegate.cpp
VulkanRenderer/RenderDelegate/imstkVulkanSphereRenderDelegate.cpp
VulkanRenderer/RenderDelegate/imstkVulkanSurfaceMeshRenderDelegate.cpp
VulkanRenderer/imstkVulkanMaterialDelegate.cpp
VulkanRenderer/imstkVulkanTextureDelegate.cpp
VulkanRenderer/imstkVulkanMemoryManager.cpp
VulkanRenderer/imstkVulkanUniformBuffer.cpp
VulkanRenderer/imstkVulkanVertexBuffer.cpp
VulkanRenderer/imstkVulkanFramebuffer.cpp
VulkanRenderer/PostProcessing/imstkVulkanPostProcess.cpp
VulkanRenderer/PostProcessing/imstkVulkanPostProcessingChain.cpp)
if( NOT iMSTK_USE_Vulkan )
set(RENDERING_H_FILES ${VTK_H_FILES})
set(RENDERING_CPP_FILES ${VTK_CPP_FILES})
set(RENDERING_SUBDIR
VTKRenderer
VTKRenderer/RenderDelegate)
set(RENDERING_DEPENDENCIES)
else()
set(RENDERING_H_FILES ${VULKAN_H_FILES})
set(RENDERING_CPP_FILES ${VULKAN_CPP_FILES})
set(RENDERING_SUBDIR
VulkanRenderer
VulkanRenderer/RenderDelegate
VulkanRenderer/PostProcessing)
set(RENDERING_DEPENDENCIES
${VulkanSDK_LIBRARIES}
glfw
glm
gli)
endif()
include(imstkAddLibrary)
imstk_add_library( Rendering
H_FILES
imstkVTKRenderer.h
imstkVTKTextureDelegate.h
imstkVTKCustomPolyDataMapper.h
RenderDelegate/imstkVTKCubeRenderDelegate.h
RenderDelegate/imstkVTKLineMeshRenderDelegate.h
RenderDelegate/imstkVTKPlaneRenderDelegate.h
RenderDelegate/imstkVTKCylinderRenderDelegate.h
RenderDelegate/imstkVTKCapsuleRenderDelegate.h
RenderDelegate/imstkVTKRenderDelegate.h
RenderDelegate/imstkVTKSphereRenderDelegate.h
RenderDelegate/imstkVTKSurfaceMeshRenderDelegate.h
RenderDelegate/imstkVTKTetrahedralMeshRenderDelegate.h
RenderDelegate/imstkVTKHexahedralMeshRenderDelegate.h
RenderDelegate/imstkVTKPointSetRenderDelegate.h
RenderDelegate/vtkCapsuleSource.h
imstkRenderer.h
${RENDERING_H_FILES}
vtkCapsuleSource.h
CPP_FILES
imstkVTKRenderer.cpp
imstkVTKTextureDelegate.cpp
imstkVTKCustomPolyDataMapper.cpp
RenderDelegate/imstkVTKCubeRenderDelegate.cpp
RenderDelegate/imstkVTKLineMeshRenderDelegate.cpp
RenderDelegate/imstkVTKPlaneRenderDelegate.cpp
RenderDelegate/imstkVTKCylinderRenderDelegate.cpp
RenderDelegate/imstkVTKCapsuleRenderDelegate.cpp
RenderDelegate/imstkVTKRenderDelegate.cpp
RenderDelegate/imstkVTKSphereRenderDelegate.cpp
RenderDelegate/imstkVTKSurfaceMeshRenderDelegate.cpp
RenderDelegate/imstkVTKTetrahedralMeshRenderDelegate.cpp
RenderDelegate/imstkVTKHexahedralMeshRenderDelegate.cpp
RenderDelegate/imstkVTKPointSetRenderDelegate.cpp
RenderDelegate/vtkCapsuleSource.cpp
imstkRenderer.cpp
${RENDERING_CPP_FILES}
vtkCapsuleSource.cpp
SUBDIR_LIST
RenderDelegate
${RENDERING_SUBDIR}
DEPENDS
${VTK_LIBRARIES}
${RENDERING_DEPENDENCIES}
Scene
#VERBOSE
)
......