diff options
author | Alejandro Marzini | 2010-07-15 05:04:44 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-15 05:04:44 +0000 |
commit | fc8b60abda3090e01f3f147f7307bbede1e7de06 (patch) | |
tree | 8f22534b844ac2c11c60a1b412f118b77400d6d8 | |
parent | 25f1980dad9348f8c0d81b3ead787c4e06af3ac1 (diff) | |
download | scummvm-rg350-fc8b60abda3090e01f3f147f7307bbede1e7de06.tar.gz scummvm-rg350-fc8b60abda3090e01f3f147f7307bbede1e7de06.tar.bz2 scummvm-rg350-fc8b60abda3090e01f3f147f7307bbede1e7de06.zip |
Fixed header for OS X, and added OpenGL feature to configure script. (Patch by clone2727)
svn-id: r50908
-rw-r--r-- | backends/graphics/opengl/glerrorcheck.cpp | 4 | ||||
-rwxr-xr-x | configure | 48 |
2 files changed, 49 insertions, 3 deletions
diff --git a/backends/graphics/opengl/glerrorcheck.cpp b/backends/graphics/opengl/glerrorcheck.cpp index a4ad1e01ea..726147a66b 100644 --- a/backends/graphics/opengl/glerrorcheck.cpp +++ b/backends/graphics/opengl/glerrorcheck.cpp @@ -37,7 +37,9 @@ #undef ARRAYSIZE #endif -#ifdef USE_GLES +#ifdef MACOSX +#include <gl.h> +#elif defined(USE_GLES) #include <GLES/gl.h> #else #include <GL/gl.h> @@ -123,6 +123,7 @@ _zlib=auto _mpeg2=no _fluidsynth=auto _16bit=auto +_opengl=auto _readline=auto # Default option behaviour yes/no _debug_build=auto @@ -676,6 +677,7 @@ Optional Features: --default-dynamic make plugins dynamic by default --disable-mt32emu don't enable the integrated MT-32 emulator --disable-16bit don't enable 16bit color support + --disable-opengl don't enable OpenGL (ES) --disable-scalers exclude scalers --disable-hq-scalers exclude HQ2x and HQ3x scalers --disable-translation don't build support for translated messages @@ -705,6 +707,9 @@ Optional Libraries: --with-mpeg2-prefix=DIR Prefix where libmpeg2 is installed (optional) --enable-mpeg2 enable mpeg2 codec for cutscenes [no] + --with-opengl-prefix=DIR Prefix where OpenGL (ES) is installed (optional) + --disable-opengl disable OpenGL (ES) support [autodetect] + --disable-indeo3 disable Indeo3 decoder [autodetect] --with-fluidsynth-prefix=DIR Prefix where libfluidsynth is installed (optional) @@ -758,6 +763,8 @@ for ac_option in $@; do --disable-fluidsynth) _fluidsynth=no ;; --enable-readline) _readline=yes ;; --disable-readline) _readline=no ;; + --enable-opengl) _opengl=yes ;; + --disable-opengl) _opengl=no ;; --enable-verbose-build) _verbose_build=yes ;; --enable-plugins) _dynamic_modules=yes ;; --default-dynamic) _plugins_default=dynamic ;; @@ -821,6 +828,11 @@ for ac_option in $@; do READLINE_CFLAGS="-I$arg/include" READLINE_LIBS="-L$arg/lib" ;; + --with-opengl-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + OPENGL_CFLAGS="-I$arg/include" + OPENGL_LIBS="-L$arg/lib" + ;; --backend=*) _backend=`echo $ac_option | cut -d '=' -f 2` ;; @@ -1345,8 +1357,10 @@ case $_host_os in ;; darwin*) DEFINES="$DEFINES -DUNIX -DMACOSX" - CXXFLAGS="$CXXFLAGS -I/System/Library/Frameworks/OpenGL.framework/Headers" - LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI -framework OpenGL" + CXXFLAGS="$CXXFLAGS" + LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI" + OPENGL_CFLAGS="-I/System/Library/Frameworks/OpenGL.framework/Headers" + OPENGL_LIBS="-framework OpenGL" add_line_to_config_mk 'MACOSX = 1' ;; dreamcast) @@ -1440,6 +1454,14 @@ case $_host_os in ;; esac +# HACK: On non-OSX systems, add the GL library +case $_host_os in + *darwin*) + ;; + *) + OPENGL_LIBS="$OPENGL_LIBS -lGL" +esac + if test -n "$_host"; then # Cross-compiling mode - add your target here if needed echo "Cross-compiling to $_host" @@ -2262,6 +2284,28 @@ else fi # +# Check for OpenGL (ES) +# +echocheck "OpenGL (ES)" +if test "$_opengl" = auto ; then +# TODO: This is just a quick hack until actual detection is added, which +# will be a pain because of the various directories that OpenGL can have +# its headers in. Maybe we should force the platforms to automatically +# include the directory that includes gl.h? + _opengl=yes +fi +if test "$_opengl" = yes ; then + _def_opengl='#define USE_OPENGL' + LIBS="$LIBS $OPENGL_LIBS" + INCLUDES="$INCLUDES $OPENGL_CFLAGS" + DEFINES="$DEFINES -DUSE_OPENGL" +else + _def_opengl='#undef USE_OPENGL' +fi + +echo "$_opengl" + +# # Check for nasm # if test "$_have_x86" = yes ; then |