From ea39e6ac7a95838ee5d67f35ca8c0f2d23b274f0 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 1 May 2011 17:01:11 +0200 Subject: [PATCH] Changed: #1275 Create an OpenGL ES driver --- code/CMakeModules/ConfigureChecks.cmake | 4 ++++ code/CMakeModules/nel.cmake | 9 +++++++++ code/config.h.cmake | 1 + 3 files changed, 14 insertions(+) diff --git a/code/CMakeModules/ConfigureChecks.cmake b/code/CMakeModules/ConfigureChecks.cmake index 707b85c86..baf6e0e7c 100644 --- a/code/CMakeModules/ConfigureChecks.cmake +++ b/code/CMakeModules/ConfigureChecks.cmake @@ -47,6 +47,10 @@ MACRO(NL_CONFIGURE_CHECKS) IF(WITH_DRIVER_OPENGL) SET(NL_OPENGL_AVAILABLE 1) ENDIF(WITH_DRIVER_OPENGL) + + IF(WITH_DRIVER_OPENGLES) + SET(NL_OPENGLES_AVAILABLE 1) + ENDIF(WITH_DRIVER_OPENGLES) IF(WITH_DRIVER_DIRECT3D) SET(NL_DIRECT3D_AVAILABLE 1) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index dc6b477d0..cf6154648 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -93,6 +93,14 @@ MACRO(NL_ADD_STATIC_VID_DRIVERS name) TARGET_LINK_LIBRARIES(${name} nel_drv_opengl) ENDIF(WIN32) ENDIF(WITH_DRIVER_OPENGL) + + IF(WITH_DRIVER_OPENGLES) + IF(WIN32) + TARGET_LINK_LIBRARIES(${name} nel_drv_opengles_win) + ELSE(WIN32) + TARGET_LINK_LIBRARIES(${name} nel_drv_opengles) + ENDIF(WIN32) + ENDIF(WITH_DRIVER_OPENGLES) ENDIF(WITH_STATIC_DRIVERS) ENDMACRO(NL_ADD_STATIC_VID_DRIVERS) @@ -208,6 +216,7 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) # Drivers Support ### OPTION(WITH_DRIVER_OPENGL "Build OpenGL Driver (3D)" ON ) + OPTION(WITH_DRIVER_OPENGLES "Build OpenGL ES Driver (3D)" OFF) OPTION(WITH_DRIVER_DIRECT3D "Build Direct3D Driver (3D)" OFF) OPTION(WITH_DRIVER_OPENAL "Build OpenAL Driver (Sound)" ON ) OPTION(WITH_DRIVER_FMOD "Build FMOD Driver (Sound)" OFF) diff --git a/code/config.h.cmake b/code/config.h.cmake index a2f65aa41..2f2ff8095 100644 --- a/code/config.h.cmake +++ b/code/config.h.cmake @@ -35,6 +35,7 @@ #cmakedefine HAVE_STAT64 1 #cmakedefine NL_OPENGL_AVAILABLE ${NL_OPENGL_AVAILABLE} +#cmakedefine NL_OPENGLES_AVAILABLE ${NL_OPENGLES_AVAILABLE} #cmakedefine NL_DIRECT3D_AVAILABLE ${NL_DIRECT3D_AVAILABLE} #cmakedefine NL_FMOD_AVAILABLE ${NL_FMOD_AVAILABLE}