Commit db5daf8b authored by Dan Lipsa's avatar Dan Lipsa

Add off-screen rendering through EGL

parent f07e3a4d
......@@ -48,6 +48,8 @@ SET(ICET_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
# Options controlling support libraries
OPTION(ICET_USE_OPENGL "Build OpenGL support layer for IceT." ON)
OPTION(ICET_USE_OSMESA "Use OffScreen Mesa" OFF)
OPTION(ICET_USE_OFFSCREEN_EGL "Use OffScreen rendering through EGL" OFF)
OPTION(ICET_USE_MPI "Build MPI communication layer for IceT." ON)
# Option to set the preferred K value to use in the radix-k algorithm
......@@ -96,19 +98,19 @@ ENDIF (UNIX)
# Configure OpenGL support.
IF (ICET_USE_OPENGL)
FIND_PACKAGE(OpenGL)
IF (OPENGL_FOUND)
IF (ICET_USE_OSMESA)
FIND_PACKAGE(OSMesa REQUIRED)
INCLUDE_DIRECTORIES(${OSMESA_INCLUDE_DIR})
SET(ICET_OPENGL_LIBRARIES ${OSMESA_LIBRARY})
ELSEIF (ICET_USE_OFFSCREEN_EGL)
FIND_PACKAGE(EGL REQUIRED)
INCLUDE_DIRECTORIES(${EGL_INCLUDE_DIR})
SET(ICET_OPENGL_LIBRARIES ${EGL_LIBRARIES})
ELSE()
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
SET(ICET_OPENGL_LIBRARIES ${OPENGL_LIBRARIES})
ELSE (OPENGL_FOUND)
FIND_PACKAGE(OSMesa)
IF (OSMESA_INCLUDE_DIR AND OSMESA_LIBRARY)
INCLUDE_DIRECTORIES(${OSMESA_INCLUDE_DIR})
SET(ICET_OPENGL_LIBRARIES ${OSMESA_LIBRARY})
ELSE(OSMESA_INCLUDE_DIR AND OSMESA_LIBRARY)
MESSAGE(SEND_ERROR "Could not find OpenGL or OSMesa, which is required when ICET_USE_OPENGL is ON.")
ENDIF (OSMESA_INCLUDE_DIR AND OSMESA_LIBRARY)
ENDIF (OPENGL_FOUND)
ENDIF()
ENDIF (ICET_USE_OPENGL)
# Configure MPI support.
......@@ -331,7 +333,7 @@ IF (NOT ICET_INSTALL_NO_DEVELOPMENT)
ENDIF (NOT ICET_INSTALL_NO_DEVELOPMENT)
# Enable CPack packaging.
SET(CPACK_PACKAGE_DESCRIPTION_FILE ${ICET_SOURCE_DIR}/README)
SET(CPACK_PACKAGE_DESCRIPTION_FILE ${ICET_SOURCE_DIR}/README.md)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Image Composition Engine for Tiles")
SET(CPACK_PACKAGE_NAME "IceT")
SET(CPACK_PACKAGE_VENDOR "Sandia National Laboratories")
......
......@@ -5,7 +5,7 @@
## This source code is released under the New BSD License.
#
IF (ICET_USE_OPENGL)
IF (ICET_USE_OPENGL AND NOT ICET_USE_OFFSCREEN_EGL)
SET(ICET_OPENGL_WINDOW_LIBRARY GLUT
CACHE STRING
"The name of the library the IceT tests will use to create windows for
......@@ -36,7 +36,7 @@ OpenGL contexts. Supported values are GLUT and GLFW."
ELSE ()
MESSAGE(SEND_ERROR "Invalid value for ICET_OPENGL_WINDOW_LIBRARY: ${ICET_OPENGL_WINDOW_LIBRARY}")
ENDIF ()
ENDIF (ICET_USE_OPENGL)
ENDIF ()
IF (NOT ICET_TESTS_USE_OPENGL)
MESSAGE(STATUS "Most tests require ICET_USE_OPENGL and GLUT or GLFW. Those tests are disabled.")
......
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