mirror of https://github.com/encounter/SDL.git
Fixes testgles and testgl
This commit is contained in:
parent
24f237710f
commit
eaa4300faf
|
@ -124,7 +124,7 @@ testgl2$(EXE): $(srcdir)/testgl2.c
|
||||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
|
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
|
||||||
|
|
||||||
testgles$(EXE): $(srcdir)/testgles.c
|
testgles$(EXE): $(srcdir)/testgles.c
|
||||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
|
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
|
||||||
|
|
||||||
testhaptic$(EXE): $(srcdir)/testhaptic.c
|
testhaptic$(EXE): $(srcdir)/testhaptic.c
|
||||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
||||||
|
|
|
@ -587,6 +587,7 @@ LIBOBJS
|
||||||
SDL_TTF_LIB
|
SDL_TTF_LIB
|
||||||
XLIB
|
XLIB
|
||||||
GLLIB
|
GLLIB
|
||||||
|
GLESLIB
|
||||||
CPP
|
CPP
|
||||||
XMKMF
|
XMKMF
|
||||||
SDL_CONFIG
|
SDL_CONFIG
|
||||||
|
@ -3785,7 +3786,7 @@ $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$have_x = xyes; then
|
if test x$have_x = xyes; then
|
||||||
if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone; then
|
if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
CFLAGS="$CFLAGS -I$ac_x_includes"
|
CFLAGS="$CFLAGS -I$ac_x_includes"
|
||||||
|
@ -3793,10 +3794,11 @@ if test x$have_x = xyes; then
|
||||||
if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
|
if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
XPATH="-L$ac_x_libraries"
|
|
||||||
if test "x$ac_x_libraries" = x; then
|
if test "x$ac_x_libraries" = x; then
|
||||||
|
XPATH=""
|
||||||
XLIB="-lX11"
|
XLIB="-lX11"
|
||||||
else
|
else
|
||||||
|
XPATH="-L$ac_x_libraries"
|
||||||
XLIB="-L$ac_x_libraries -lX11"
|
XLIB="-L$ac_x_libraries -lX11"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -3859,14 +3861,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
$as_echo "$have_opengles" >&6; }
|
$as_echo "$have_opengles" >&6; }
|
||||||
|
|
||||||
GLLIB=""
|
GLLIB=""
|
||||||
|
GLESLIB=""
|
||||||
if test x$have_opengles = xyes; then
|
if test x$have_opengles = xyes; then
|
||||||
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
|
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
|
||||||
GLLIB="$XPATH -lGLESv1_CM"
|
GLESLIB="$XPATH -lGLESv1_CM"
|
||||||
elif test x$have_opengl = xyes; then
|
fi
|
||||||
|
if test x$have_opengl = xyes; then
|
||||||
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
||||||
GLLIB="$XPATH $SYS_GL_LIBS"
|
GLLIB="$XPATH $SYS_GL_LIBS"
|
||||||
else
|
|
||||||
GLLIB=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ LIBS="$LIBS $SDL_LIBS -lSDL2_test"
|
||||||
dnl Check for X11 path, needed for OpenGL on some systems
|
dnl Check for X11 path, needed for OpenGL on some systems
|
||||||
AC_PATH_X
|
AC_PATH_X
|
||||||
if test x$have_x = xyes; then
|
if test x$have_x = xyes; then
|
||||||
if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone; then
|
if test x$ac_x_includes = xno || test "x$ac_x_includes" = xNone || test "x$ac_x_includes" = x; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
CFLAGS="$CFLAGS -I$ac_x_includes"
|
CFLAGS="$CFLAGS -I$ac_x_includes"
|
||||||
|
@ -99,10 +99,11 @@ if test x$have_x = xyes; then
|
||||||
if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
|
if test x$ac_x_libraries = xno || test "x$ac_x_libraries" = xNone; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
XPATH="-L$ac_x_libraries"
|
|
||||||
if test "x$ac_x_libraries" = x; then
|
if test "x$ac_x_libraries" = x; then
|
||||||
|
XPATH=""
|
||||||
XLIB="-lX11"
|
XLIB="-lX11"
|
||||||
else
|
else
|
||||||
|
XPATH="-L$ac_x_libraries"
|
||||||
XLIB="-L$ac_x_libraries -lX11"
|
XLIB="-L$ac_x_libraries -lX11"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -135,17 +136,18 @@ have_opengles=yes
|
||||||
AC_MSG_RESULT($have_opengles)
|
AC_MSG_RESULT($have_opengles)
|
||||||
|
|
||||||
GLLIB=""
|
GLLIB=""
|
||||||
|
GLESLIB=""
|
||||||
if test x$have_opengles = xyes; then
|
if test x$have_opengles = xyes; then
|
||||||
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
|
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
|
||||||
GLLIB="$XPATH -lGLESv1_CM"
|
GLESLIB="$XPATH -lGLESv1_CM"
|
||||||
elif test x$have_opengl = xyes; then
|
fi
|
||||||
|
if test x$have_opengl = xyes; then
|
||||||
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
||||||
GLLIB="$XPATH $SYS_GL_LIBS"
|
GLLIB="$XPATH $SYS_GL_LIBS"
|
||||||
else
|
|
||||||
GLLIB=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(GLLIB)
|
AC_SUBST(GLLIB)
|
||||||
|
AC_SUBST(GLESLIB)
|
||||||
AC_SUBST(XLIB)
|
AC_SUBST(XLIB)
|
||||||
|
|
||||||
dnl Check for SDL_ttf
|
dnl Check for SDL_ttf
|
||||||
|
|
|
@ -159,6 +159,8 @@ main(int argc, char *argv[])
|
||||||
state->gl_green_size = 5;
|
state->gl_green_size = 5;
|
||||||
state->gl_blue_size = 5;
|
state->gl_blue_size = 5;
|
||||||
state->gl_depth_size = depth;
|
state->gl_depth_size = depth;
|
||||||
|
state->gl_major_version = 1;
|
||||||
|
state->gl_minor_version = 1;
|
||||||
if (fsaa) {
|
if (fsaa) {
|
||||||
state->gl_multisamplebuffers=1;
|
state->gl_multisamplebuffers=1;
|
||||||
state->gl_multisamplesamples=fsaa;
|
state->gl_multisamplesamples=fsaa;
|
||||||
|
@ -177,6 +179,8 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create OpenGL ES contexts */
|
/* Create OpenGL ES contexts */
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
|
||||||
|
|
||||||
for (i = 0; i < state->num_windows; i++) {
|
for (i = 0; i < state->num_windows; i++) {
|
||||||
context[i] = SDL_GL_CreateContext(state->windows[i]);
|
context[i] = SDL_GL_CreateContext(state->windows[i]);
|
||||||
if (!context[i]) {
|
if (!context[i]) {
|
||||||
|
|
Loading…
Reference in New Issue