mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
0026512: Build fails with VTK 6.2 and OpenGL2 Rendering Backend
Support of VTK with OpenGL2 Rendering Backend was added.
This commit is contained in:
parent
6b52f1253e
commit
88d533be65
@ -235,6 +235,21 @@ if (APPLE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Update list of used VTK libraries if OpenGL2 Rendering BackEnd is used.
|
||||||
|
# Add VTK_OPENGL2_BACKEND definition.
|
||||||
|
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
|
||||||
|
add_definitions(-DVTK_OPENGL2_BACKEND)
|
||||||
|
foreach (VTK_EXCLUDE_LIBRARY vtkRenderingOpenGL vtkRenderingFreeTypeOpenGL)
|
||||||
|
list (FIND USED_TOOLKITS_BY_CURRENT_PROJECT "${VTK_EXCLUDE_LIBRARY}" IS_VTK_OPENGL_FOUND)
|
||||||
|
if (NOT ${IS_VTK_OPENGL_FOUND} EQUAL -1)
|
||||||
|
list (REMOVE_ITEM USED_TOOLKITS_BY_CURRENT_PROJECT ${VTK_EXCLUDE_LIBRARY})
|
||||||
|
if (${VTK_EXCLUDE_LIBRARY} STREQUAL vtkRenderingOpenGL)
|
||||||
|
list (APPEND USED_TOOLKITS_BY_CURRENT_PROJECT vtkRenderingOpenGL2)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
|
||||||
endif()
|
endif()
|
||||||
|
@ -27,7 +27,11 @@ IMPLEMENT_STANDARD_RTTIEXT(IVtkVTK_View,IVtk_IView)
|
|||||||
// Since VTK 6 the factory methods require "auto-initialization" depending on
|
// Since VTK 6 the factory methods require "auto-initialization" depending on
|
||||||
// what modules are enabled at VTK configure time.
|
// what modules are enabled at VTK configure time.
|
||||||
// Some defines are needed in order to make the factories work properly.
|
// Some defines are needed in order to make the factories work properly.
|
||||||
|
#ifdef VTK_OPENGL2_BACKEND
|
||||||
|
VTK_MODULE_INIT(vtkRenderingOpenGL2)
|
||||||
|
#else
|
||||||
VTK_MODULE_INIT(vtkRenderingOpenGL)
|
VTK_MODULE_INIT(vtkRenderingOpenGL)
|
||||||
|
#endif
|
||||||
VTK_MODULE_INIT(vtkInteractionStyle)
|
VTK_MODULE_INIT(vtkInteractionStyle)
|
||||||
|
|
||||||
// Handle implementation
|
// Handle implementation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user