Skip to content

Commit

Permalink
Modifications supplied by Matias Montroull towards a working Activiz …
Browse files Browse the repository at this point in the history
…- OpenGL2 build.
  • Loading branch information
zamirkhan committed Aug 17, 2016
1 parent 6772cc7 commit dae2417
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
34 changes: 20 additions & 14 deletions CMakeLists.txt
Expand Up @@ -116,6 +116,7 @@ if(NOT DEFINED AVDN_CONFIG)
set(AVDN_CONFIG "${AVDN_CONFIG_DEFAULT}") # CACHE?
endif()


# Define MUMMY_ADD_CSHARP_CONFIG so the linkresource arguments get put
# into the response file instead of directly on the csc command line,
# because there are too many VTK dlls to list them all on an 8K
Expand Down Expand Up @@ -161,6 +162,7 @@ endif()
if(MSVC90)
set(gccxml_compiler "msvc9")
endif()
SET (GCCXML_EXTRA_D_ARGS "_HAS_TR1=0")

# VTK:
#
Expand Down Expand Up @@ -265,6 +267,8 @@ set(AVDN_VTK_DATA_ROOT "${VTK_DIR}/ExternalData/Testing")
# then use the public key file in the source tree to /delaysign
# .NET assemblies...
#
GET_FILENAME_COMPONENT(AVDN_SNKEYFILE "${CMAKE_CURRENT_SOURCE_DIR}/activiz.snk" ABSOLUTE)

set(AVDN_SNKEYFILE "" CACHE FILEPATH "Specify the SNKEY" )
if(AVDN_SNKEYFILE STREQUAL "")
get_filename_component(AVDN_SNKEYFILE "${ActiVizDotNet_SOURCE_DIR}/Kitware.VTK.pub.snk" ABSOLUTE)
Expand Down Expand Up @@ -546,19 +550,21 @@ IF(HasMyModule EQUAL -1)
ENDIF()


add_custom_command(
OUTPUT ${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}.xml
COMMAND ${gccxml_EXECUTABLE}
-fxml=${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}.xml
-fxml-start=_cable_
${gccxml_include_args} -DCABLE_CONFIGURATION
--gccxml-compiler ${gccxml_compiler}
${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx
DEPENDS
${ActiVizDotNet_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx
${header}
${gccxml_EXECUTABLE}
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml
COMMAND ${gccxml_EXECUTABLE}
ARGS
-fxml=${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}.xml
-fxml-start=_cable_
${gccxml_include_args} -DCABLE_CONFIGURATION
--gccxml-compiler ${gccxml_compiler}
${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx
-D${GCCXML_EXTRA_D_ARGS}
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/xml/${cxxclass}_gccxml.cxx
${header}
${gccxml_EXECUTABLE}
)

#
# *before* custom command re-arranging:
Expand Down Expand Up @@ -1041,7 +1047,7 @@ else()
endif()
target_link_libraries(Kitware.VTK.${module}.Unmanaged ${module})
# This is odd and should be changed (by JJ)
target_link_libraries(Kitware.VTK.${module}.Unmanaged vtkRenderingFreeTypeOpenGL vtkRenderingFreeType vtkInteractionStyle vtkRenderingVolumeOpenGL)
target_link_libraries(Kitware.VTK.${module}.Unmanaged vtkRenderingFreeType vtkInteractionStyle vtkRenderingVolumeOpenGL vtkRenderingContextOpenGL)
foreach(dep ${${module}_LINK_DEPENDS})
if(NOT "${dep}" STREQUAL "${module}")
if(NOT ${dep}_EXCLUDE_FROM_WRAPPING)
Expand Down
10 changes: 5 additions & 5 deletions WrappedObject.cs.in
Expand Up @@ -66,11 +66,11 @@ namespace @csharp_namespace@
s = o.ToString();
}

// from vtkRenderingFreeTypeOpenGL
using (Kitware.VTK.vtkOpenGLFreeTypeTextMapper o = Kitware.VTK.vtkOpenGLFreeTypeTextMapper.New())
{
s = o.ToString();
}
// from vtkRenderingFreeTypeOpenGL (no longer used in VTK 6.3 and forward)
// using (Kitware.VTK.vtkOpenGLFreeTypeTextMapper o = Kitware.VTK.vtkOpenGLFreeTypeTextMapper.New())
// {
// s = o.ToString();
// }
}
}
}
10 changes: 5 additions & 5 deletions vtkObject_Extra.cs.in
@@ -1,4 +1,4 @@
[DllImport(vtkCommonEL_dll, EntryPoint = "vtkObject_Print")]
[DllImport(vtkCommonCoreEL_dll, EntryPoint = "vtkObject_Print")]
static extern string vtkObject_Print(HandleRef pThis);

/// <summary>
Expand Down Expand Up @@ -149,7 +149,7 @@ public class vtkObjectEventRelay : WrappedObject
}


[DllImport(vtkCommonEL_dll, EntryPoint = "vtkObjectEventRelay_New")]
[DllImport(vtkCommonCoreEL_dll, EntryPoint = "vtkObjectEventRelay_New")]
internal static extern IntPtr vtkObjectEventRelay_New(ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);

/// <summary>
Expand All @@ -176,7 +176,7 @@ public class vtkObjectEventRelay : WrappedObject
}


[DllImport(vtkCommonEL_dll, EntryPoint = "vtkObjectEventRelay_Delete")]
[DllImport(vtkCommonCoreEL_dll, EntryPoint = "vtkObjectEventRelay_Delete")]
internal static extern void vtkObjectEventRelay_Delete(HandleRef pThis);

/// <summary>
Expand Down Expand Up @@ -213,7 +213,7 @@ public class vtkObjectEventRelay : WrappedObject
IntPtr caller, uint eventId, IntPtr callData);
private RelayHandler RelayHandlerDelegate;

[DllImport(vtkCommonEL_dll, EntryPoint = "vtkObjectEventRelay_AddObserver")]
[DllImport(vtkCommonCoreEL_dll, EntryPoint = "vtkObjectEventRelay_AddObserver")]
internal static extern uint vtkObjectEventRelay_AddObserver(
HandleRef pThis, HandleRef sender, uint eventid, RelayHandler handler, float priority);

Expand All @@ -230,7 +230,7 @@ public class vtkObjectEventRelay : WrappedObject
}


[DllImport(vtkCommonEL_dll, EntryPoint = "vtkObjectEventRelay_RemoveObserver")]
[DllImport(vtkCommonCoreEL_dll, EntryPoint = "vtkObjectEventRelay_RemoveObserver")]
internal static extern uint vtkObjectEventRelay_RemoveObserver(
HandleRef pThis, uint observerId);

Expand Down
2 changes: 1 addition & 1 deletion vtkProgrammableAttributeDataFilter_Extra.cs
Expand Up @@ -3,7 +3,7 @@
/// </summary>
public delegate void ExecuteMethodHandler(IntPtr arg);

[DllImport(vtkGraphicsEL_dll, EntryPoint = "vtkProgrammableAttributeDataFilter_SetExecuteMethod")]
[DllImport(vtkFiltersProgrammableEL_dll, EntryPoint = "vtkProgrammableAttributeDataFilter_SetExecuteMethod")]
internal static extern void vtkProgrammableAttributeDataFilter_SetExecuteMethod(HandleRef pThis, ExecuteMethodHandler handler, IntPtr arg);

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion vtkStringArray_Extra.cs
@@ -1,4 +1,4 @@
[DllImport(vtkCommonEL_dll, EntryPoint = "vtkStringArray_GetValue")]
[DllImport(vtkCommonCoreEL_dll, EntryPoint = "vtkStringArray_GetValue")]
internal static extern string vtkStringArray_GetValue(HandleRef pThis, long id);

/// <summary>
Expand Down

0 comments on commit dae2417

Please sign in to comment.