Commit 97348bb5 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

Added in vtkRenderingHybridOpenGL

This module was created mainly for the LIC2D rendering classes, which
are OpenGL dependent. The TestImageDataLIC2D segfaults, but was
segfaulting before. It looks like an issue introduced with the backward
compatibility changes.

Change-Id: Ia5de33a94136bf244fb1644d5b5cd2517b435d6a
parent 355a353a
set(Module_SRCS
vtkImageDataLIC2D.cxx
vtkImageDataLIC2DExtentTranslator.cxx
vtkStructuredGridLIC2D.cxx
vtkSurfaceLICDefaultPainter.cxx
vtkSurfaceLICPainter.cxx
)
set(shader_files
vtkStructuredGridLIC2D_fs.glsl
vtkSurfaceLICPainter_fs1.glsl
vtkSurfaceLICPainter_fs2.glsl
vtkSurfaceLICPainter_vs1.glsl
)
unset(shader_h_files)
foreach(file ${shader_files})
get_filename_component(file_we ${file} NAME_WE)
set(src ${CMAKE_CURRENT_SOURCE_DIR}/${file})
set(res ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.cxx)
set(resh ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.h)
list(APPEND shader_h_files ${resh})
add_custom_command(
OUTPUT ${res} ${resh}
DEPENDS ${src} vtkEncodeString
COMMAND vtkEncodeString
ARGS ${res} ${src} ${file_we}
--build-header VTKRENDERINGHYBRIDOPENGL_EXPORT vtkRenderingHybridOpenGLModule.h
)
list(APPEND Module_SRCS ${res})
set_source_files_properties(${file_we} WRAP_EXCLUDE)
endforeach()
vtk_module_library(${vtk-module} ${Module_SRCS})
set(MyTests
TestSurfaceLIC.cxx
)
if(NOT APPLE)
# This is from the old build system - not working on Apple platform.
list(APPEND MyTests
TestImageDataLIC2D.cxx # This was segfaulting before modularization (and is now).
TestStructuredGridLIC2DXSlice.cxx
TestStructuredGridLIC2DYSlice.cxx
TestStructuredGridLIC2DZSlice.cxx
)
endif()
# Use the testing object factory, to reduce boilerplate code in tests.
include("${VTK_SOURCE_DIR}/Testing/Rendering/vtkTestingObjectFactory.cmake")
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun CxxTests.cxx)
list(REMOVE_ITEM TestsToRun TestSurfaceLIC.cxx)
add_test(NAME ${vtk-module}Cxx-SurfaceLIC
COMMAND ${vtk-module}CxxTests TestSurfaceLIC
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Rendering/TestSurfaceLIC.png)
# Add all the executables
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Hybrid/${TName}.png)
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName})
endif()
endforeach()
vtk_module(vtkRenderingHybridOpenGL
GROUPS
Rendering
DEPENDS
vtkImagingSources
vtkImagingHybrid
vtkRenderingOpenGL
TEST_DEPENDS
vtkTestingCore
vtkTestingRendering
)
......@@ -43,14 +43,14 @@
#ifndef __vtkImageDataLIC2D_h
#define __vtkImageDataLIC2D_h
#include "vtkFiltersHybridModule.h" // For export macro
#include "vtkRenderingHybridOpenGLModule.h" // For export macro
#include "vtkImageAlgorithm.h"
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
class vtkRenderWindow;
class vtkImageNoiseSource;
class VTKFILTERSHYBRID_EXPORT vtkImageDataLIC2D : public vtkImageAlgorithm
class VTKRENDERINGHYBRIDOPENGL_EXPORT vtkImageDataLIC2D : public vtkImageAlgorithm
{
public:
static vtkImageDataLIC2D* New();
......
......@@ -18,13 +18,14 @@
#ifndef __vtkImageDataLIC2DExtentTranslator_h
#define __vtkImageDataLIC2DExtentTranslator_h
#include "vtkFiltersHybridModule.h" // For export macro
#include "vtkRenderingHybridOpenGLModule.h" // For export macro
#include "vtkExtentTranslator.h"
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
class vtkImageDataLIC2D;
class VTKFILTERSHYBRID_EXPORT vtkImageDataLIC2DExtentTranslator : public vtkExtentTranslator
class VTKRENDERINGHYBRIDOPENGL_EXPORT vtkImageDataLIC2DExtentTranslator
: public vtkExtentTranslator
{
public:
static vtkImageDataLIC2DExtentTranslator* New();
......
......@@ -39,14 +39,15 @@
#ifndef __vtkStructuredGridLIC2D_h
#define __vtkStructuredGridLIC2D_h
#include "vtkFiltersHybridModule.h" // For export macro
#include "vtkRenderingHybridOpenGLModule.h" // For export macro
#include "vtkStructuredGridAlgorithm.h"
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
class vtkRenderWindow;
class vtkImageNoiseSource;
class VTKFILTERSHYBRID_EXPORT vtkStructuredGridLIC2D : public vtkStructuredGridAlgorithm
class VTKRENDERINGHYBRIDOPENGL_EXPORT vtkStructuredGridLIC2D
: public vtkStructuredGridAlgorithm
{
public:
static vtkStructuredGridLIC2D* New();
......
......@@ -120,15 +120,6 @@ if(VTK_USE_GLSL_SHADERS)
TestGenericVertexAttributesGLSLAlphaBlending.cxx
TestGenericVertexAttributesGLSLDepthPeelingPass.cxx
)
# Temporarily disable LIC tests on Mac
if(NOT APPLE)
if(VTK_DATA_ROOT)
set(RenderingTestsWithArguments
${RenderingTestsWithArguments}
TestSurfaceLIC.cxx
)
endif()
endif()
endif()
create_test_sourcelist(Tests ${vtk-module}CxxTests.cxx
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment