Adds testgles2

Source code copied from: https://github.com/fantasydr/sdl-2.0-gles (thanks!)

Minor fixes, configure script changes done by me.
This commit is contained in:
Gabriel Jacobo
2013-11-19 10:56:38 -03:00
parent fdfea4ad1f
commit 47139fb3eb
5 changed files with 713 additions and 1 deletions

38
test/configure vendored
View File

@@ -587,6 +587,7 @@ LIBOBJS
SDL_TTF_LIB
XLIB
GLESLIB
GLES2LIB
GLLIB
CPP
XMKMF
@@ -3860,12 +3861,49 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles" >&5
$as_echo "$have_opengles" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL ES2 support" >&5
$as_echo_n "checking for OpenGL ES2 support... " >&6; }
have_opengles2=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined (__IPHONEOS__)
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
have_opengles2=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_opengles2" >&5
$as_echo "$have_opengles2" >&6; }
GLLIB=""
GLESLIB=""
GLES2LIB=""
if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLESLIB="$XPATH -lGLESv1_CM"
fi
if test x$have_opengles2 = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES2"
GLES2LIB="$XPATH -lGLESv2"
fi
if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"