<commit_before># FIXME: This should probably be fixed, vtkgl generation needs some refinement
# to allow for things to split up properly.

set(VTK_USE_X_DEFAULT OFF)

if(APPLE)
  option(VTK_USE_COCOA "Use Cocoa for VTK render windows" ON)
  option(VTK_USE_CARBON "Use Carbon for VTK render windows (deprecated)" OFF)
  mark_as_advanced(VTK_USE_COCOA VTK_USE_CARBON)
  if(VTK_USE_COCOA AND VTK_USE_CARBON)
    message(FATAL_ERROR "You can't enable Carbon and Cocoa - you must choose one.")
  endif()
elseif(UNIX)
  set(VTK_USE_X_DEFAULT ON)
endif()

option(VTK_USE_X "Use X for VTK render windows" ${VTK_USE_X_DEFAULT})
mark_as_advanced(VTK_USE_X)

# OSMesa logic for offscreen mesa rendering.
option(VTK_OPENGL_HAS_OSMESA
  "The OpenGL library being used supports off screen Mesa calls" OFF)
option(VTK_USE_OFFSCREEN "Use off screen calls by default" OFF)
unset(VTK_CAN_DO_OFFSCREEN)
if(VTK_OPENGL_HAS_OSMESA OR WIN32)
  set(VTK_CAN_DO_OFFSCREEN 1)
endif()
mark_as_advanced(VTK_OPENGL_HAS_OSMESA VTK_USE_OFFSCREEN)
if(VTK_USE_X OR VTK_USE_CARBON OR VTK_USE_COCOA OR WIN32)
  set(VTK_USE_OSMESA FALSE)
else()
  set(VTK_USE_OSMESA TRUE)
endif()

# FIXME: The TDx support needs some refactoring before we can build it in a
# modular fashion, for now it must remain an option on vtkRenderingOpenGL.
option(VTK_USE_TDX "Use TDx interaction devices" OFF)
mark_as_advanced(VTK_USE_TDX)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkTDxConfigure.h.in
  ${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h)

set(Module_SRCS
  vtkCameraPass.cxx
  vtkClearZPass.cxx
  vtkColorMaterialHelper.cxx
  vtkDataTransferHelper.cxx
  vtkDefaultPass.cxx
  vtkDepthPeelingPass.cxx
  vtkFrameBufferObject.cxx
  vtkFrameBufferObject2.cxx
  vtkGLSLShaderDeviceAdapter2.cxx
  vtkGaussianBlurPass.cxx
  vtkGenericOpenGLRenderWindow.cxx
  vtkImageProcessingPass.cxx
  vtkLightingHelper.cxx
  vtkLightsPass.cxx
  vtkOpaquePass.cxx
  vtkOpenGLActor.cxx
  vtkOpenGLCamera.cxx
  vtkOpenGLClipPlanesPainter.cxx
  vtkOpenGLCoincidentTopologyResolutionPainter.cxx
  vtkOpenGLCompositePainter.cxx
  vtkOpenGLDisplayListPainter.cxx
  vtkOpenGLExtensionManager.cxx
  vtkOpenGLGL2PSHelper.cxx
  vtkOpenGLGlyph3DMapper.cxx
  vtkOpenGLHardwareSelector.cxx
  vtkOpenGLHardwareSupport.cxx
  vtkOpenGLImageMapper.cxx
  vtkOpenGLImageSliceMapper.cxx
  vtkOpenGLLight.cxx
  vtkOpenGLLightMonitor.cxx
  vtkOpenGLLightingPainter.cxx
  vtkOpenGLModelViewProjectionMonitor.cxx
  vtkOpenGLPainterDeviceAdapter.cxx
  vtkOpenGLPolyDataMapper.cxx
  vtkOpenGLPolyDataMapper2D.cxx
  vtkOpenGLProperty.cxx
  vtkOpenGLRenderWindow.cxx
  vtkOpenGLRenderer.cxx
  vtkOpenGLRepresentationPainter.cxx
  vtkOpenGLScalarsToColorsPainter.cxx
  vtkOpenGLState.cxx
  vtkOpenGLTexture.cxx
  vtkOverlayPass.cxx
  vtkPixelBufferObject.cxx
  vtkRenderPass.cxx
  vtkRenderPassCollection.cxx
  vtkRenderState.cxx
  vtkRenderbuffer.cxx
  vtkRenderbuffer.cxx
  vtkSequencePass.cxx
  vtkShader2.cxx
  vtkShader2Collection.cxx
  vtkShaderProgram2.cxx
  vtkShadowMapBakerPass.cxx
  vtkShadowMapPass.cxx
  vtkSobelGradientMagnitudePass.cxx
  vtkTextureObject.cxx
  vtkTextureUnitManager.cxx
  vtkTranslucentPass.cxx
  vtkUniformVariables.cxx
  vtkVolumetricPass.cxx
  ${CMAKE_CURRENT_BINARY_DIR}/vtkgl.cxx
  ${CMAKE_CURRENT_BINARY_DIR}/vtkRenderingOpenGLObjectFactory.cxx
  )

set(${vtk-module}_HDRS
  vtkgluPickMatrix.h
  vtkOpenGL.h
  vtkOpenGLProjectedPolyDataRayBounder.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkRenderingOpenGLConfigure.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkgl.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkOpenGLError.h
  )

set_source_files_properties(
  vtkImageProcessingPass
  vtkOpenGLRenderWindow
  vtkRenderPass
  vtkRenderState
  ABSTRACT
  )

set_source_files_properties(
  vtkLightingHelper
  vtkRenderState
  vtkOpenGLState
  vtkOpenGLGL2PSHelper
  vtkShader2
  vtkShader2Collection
  vtkShaderProgram2
  vtkTextureUnitManager<commit_msg>Fix build issues with deprecated vtkOpenGLPolyDataMapper.<commit_after># FIXME: This should probably be fixed, vtkgl generation needs some refinement
# to allow for things to split up properly.

set(VTK_USE_X_DEFAULT OFF)

if(APPLE)
  option(VTK_USE_COCOA "Use Cocoa for VTK render windows" ON)
  option(VTK_USE_CARBON "Use Carbon for VTK render windows (deprecated)" OFF)
  mark_as_advanced(VTK_USE_COCOA VTK_USE_CARBON)
  if(VTK_USE_COCOA AND VTK_USE_CARBON)
    message(FATAL_ERROR "You can't enable Carbon and Cocoa - you must choose one.")
  endif()
elseif(UNIX)
  set(VTK_USE_X_DEFAULT ON)
endif()

option(VTK_USE_X "Use X for VTK render windows" ${VTK_USE_X_DEFAULT})
mark_as_advanced(VTK_USE_X)

# OSMesa logic for offscreen mesa rendering.
option(VTK_OPENGL_HAS_OSMESA
  "The OpenGL library being used supports off screen Mesa calls" OFF)
option(VTK_USE_OFFSCREEN "Use off screen calls by default" OFF)
unset(VTK_CAN_DO_OFFSCREEN)
if(VTK_OPENGL_HAS_OSMESA OR WIN32)
  set(VTK_CAN_DO_OFFSCREEN 1)
endif()
mark_as_advanced(VTK_OPENGL_HAS_OSMESA VTK_USE_OFFSCREEN)
if(VTK_USE_X OR VTK_USE_CARBON OR VTK_USE_COCOA OR WIN32)
  set(VTK_USE_OSMESA FALSE)
else()
  set(VTK_USE_OSMESA TRUE)
endif()

# FIXME: The TDx support needs some refactoring before we can build it in a
# modular fashion, for now it must remain an option on vtkRenderingOpenGL.
option(VTK_USE_TDX "Use TDx interaction devices" OFF)
mark_as_advanced(VTK_USE_TDX)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vtkTDxConfigure.h.in
  ${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h)

set(Module_SRCS
  vtkCameraPass.cxx
  vtkClearZPass.cxx
  vtkColorMaterialHelper.cxx
  vtkDataTransferHelper.cxx
  vtkDefaultPass.cxx
  vtkDepthPeelingPass.cxx
  vtkFrameBufferObject.cxx
  vtkFrameBufferObject2.cxx
  vtkGLSLShaderDeviceAdapter2.cxx
  vtkGaussianBlurPass.cxx
  vtkGenericOpenGLRenderWindow.cxx
  vtkImageProcessingPass.cxx
  vtkLightingHelper.cxx
  vtkLightsPass.cxx
  vtkOpaquePass.cxx
  vtkOpenGLActor.cxx
  vtkOpenGLCamera.cxx
  vtkOpenGLClipPlanesPainter.cxx
  vtkOpenGLCoincidentTopologyResolutionPainter.cxx
  vtkOpenGLCompositePainter.cxx
  vtkOpenGLDisplayListPainter.cxx
  vtkOpenGLExtensionManager.cxx
  vtkOpenGLGL2PSHelper.cxx
  vtkOpenGLGlyph3DMapper.cxx
  vtkOpenGLHardwareSelector.cxx
  vtkOpenGLHardwareSupport.cxx
  vtkOpenGLImageMapper.cxx
  vtkOpenGLImageSliceMapper.cxx
  vtkOpenGLLight.cxx
  vtkOpenGLLightMonitor.cxx
  vtkOpenGLLightingPainter.cxx
  vtkOpenGLModelViewProjectionMonitor.cxx
  vtkOpenGLPainterDeviceAdapter.cxx
  vtkOpenGLPolyDataMapper2D.cxx
  vtkOpenGLProperty.cxx
  vtkOpenGLRenderWindow.cxx
  vtkOpenGLRenderer.cxx
  vtkOpenGLRepresentationPainter.cxx
  vtkOpenGLScalarsToColorsPainter.cxx
  vtkOpenGLState.cxx
  vtkOpenGLTexture.cxx
  vtkOverlayPass.cxx
  vtkPixelBufferObject.cxx
  vtkRenderPass.cxx
  vtkRenderPassCollection.cxx
  vtkRenderState.cxx
  vtkRenderbuffer.cxx
  vtkRenderbuffer.cxx
  vtkSequencePass.cxx
  vtkShader2.cxx
  vtkShader2Collection.cxx
  vtkShaderProgram2.cxx
  vtkShadowMapBakerPass.cxx
  vtkShadowMapPass.cxx
  vtkSobelGradientMagnitudePass.cxx
  vtkTextureObject.cxx
  vtkTextureUnitManager.cxx
  vtkTranslucentPass.cxx
  vtkUniformVariables.cxx
  vtkVolumetricPass.cxx
  ${CMAKE_CURRENT_BINARY_DIR}/vtkgl.cxx
  ${CMAKE_CURRENT_BINARY_DIR}/vtkRenderingOpenGLObjectFactory.cxx
  )
if (NOT VTK_LEGACY_REMOVE)
  # vtkOpenGLPolyDataMapper is only added if not removing legacy code.
  list(APPEND Module_SRCS
    vtkOpenGLPolyDataMapper.cxx)
endif()

set(${vtk-module}_HDRS
  vtkgluPickMatrix.h
  vtkOpenGL.h
  vtkOpenGLProjectedPolyDataRayBounder.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkTDxConfigure.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkRenderingOpenGLConfigure.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkgl.h
  ${CMAKE_CURRENT_BINARY_DIR}/vtkOpenGLError.h
  )

set_source_files_properties(
  vtkImageProcessingPass
  vtkOpenGLRenderWindow
  vtkRenderPass
  vtkRenderState
  ABSTRACT
  )

set_source_files_properties(
  vtkLightingHelper
  vtkRenderState
  vtkOpenGLState
  vtkOpenGLGL2PSHelper
  vtkShader2
  vtkShader2Collection
  vtkShaderProgram2
  vtkTextureUnitManager
{'fraction_non_alphanumeric': 0.05335499187804573, 'fraction_numerical': 0.004248406847432213, 'mean_word_length': 6.210810810810811, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2862339', 'n_tokens_mistral': 3235, 'n_tokens_neox': 3196, 'n_words': 497}