Various fixes to enable building SDL/OpenGLES

SVN revision: 45692
This commit is contained in:
xcomputerman 2010-01-29 06:12:35 +00:00 committed by xcomputerman
parent dcd3b345e5
commit a61baea31e
5 changed files with 48 additions and 30 deletions

View File

@ -508,20 +508,26 @@ EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}],
# common gl
have_evas_engine_gl_common="no"
if test "x$have_evas_engine_gl_x11" = "xyes" -o "x$have_evas_engine_gl_glew" = "xyes" \
-o "x$have_evas_gl_sdl" ="xyes"; then
AC_DEFINE(BUILD_ENGINE_GL_COMMON, 1, [Generic OpenGL Rendering Support])
if test "x$have_evas_engine_gl_x11" = "xyes"; then
have_evas_engine_gl_common="yes"
evas_engine_gl_common_libs=""
fi
if test "x$have_evas_engine_gl_glew" = "xyes" ; then
if test "x$have_evas_engine_gl_glew" = "xyes"; then
have_evas_engine_gl_common="yes"
evas_engine_gl_common_libs=""
fi
if test "x$have_evas_engine_gl_sdl" = "xyes"; then
have_evas_engine_gl_common="yes"
fi
if test "x$have_evas_engine_gl_common" = "xyes"; then
evas_engine_gl_common_libs=""
AC_DEFINE(BUILD_ENGINE_GL_COMMON, [1], [Generic OpenGL Rendering Support])
fi
AC_SUBST([evas_engine_gl_common_libs])
AM_CONDITIONAL(BUILD_ENGINE_GL_COMMON, test "x$have_evas_engine_gl_common" = "xyes")
AM_CONDITIONAL(BUILD_ENGINE_GL_COMMON, [test "x$have_evas_engine_gl_common" = "xyes"])
# gl_sdl
if test "x$have_evas_engine_gl_sdl" = "xyes"; then
@ -1345,7 +1351,12 @@ echo "Engines:"
echo " Software Memory Buffer.....: $have_evas_engine_buffer"
echo " Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
echo " XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
echo " OpenGL X11.................: $have_evas_engine_gl_x11 (GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
echo -n " OpenGL X11.................: $have_evas_engine_gl_x11 "
if test "x$have_evas_engine_gl_x11" = "xyes"; then
echo "(GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
else
echo
fi
#echo " Cairo X11..................: $have_evas_engine_cairo_x11"
echo " Software GDI...............: $have_evas_engine_software_gdi"
echo " Software DirectDraw........: $have_evas_engine_software_ddraw"
@ -1353,7 +1364,12 @@ echo " Direct3d...................: $have_evas_engine_direct3d"
echo " Quartz.....................: $have_evas_engine_quartz"
echo " OpenGL Glew................: $have_evas_engine_gl_glew"
echo " Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
echo " OpenGL SDL.................: $have_evas_engine_gl_sdl"
echo -n " OpenGL SDL.................: $have_evas_engine_gl_sdl "
if test "x$have_evas_engine_gl_sdl" = "xyes"; then
echo "(GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
else
echo
fi
echo " Software Framebuffer.......: $have_evas_engine_fb"
echo " DirectFB...................: $have_evas_engine_directfb"
#echo " Software Qtopia............: $have_evas_engine_software_qtopia"

View File

@ -520,7 +520,7 @@ if test "x${have_dep}" = "xyes" ; then
evas_engine_[]$1[]_libs="${SDL_LIBS} -lGL -lpthread"
evas_engine_gl_common_libs="-lGL -lpthread"
else
AC_CHECK_HEADERS([EGL/egl.h], [have_egl="yes"])
AC_CHECK_HEADERS([SDL/SDL_opengles.h EGL/egl.h], [have_egl="yes"])
if test "x${have_egl}" = "xyes" ; then
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lpthread -lm)
if test "x${have_glesv2}" = "xyes" ; then

View File

@ -23,6 +23,9 @@ endif
if !EVAS_STATIC_BUILD_GL_X11
SUBDIRS += gl_common gl_x11
endif
if !EVAS_STATIC_BUILD_GL_SDL
SUBDIRS += gl_common gl_sdl
endif
if !EVAS_STATIC_BUILD_QUARTZ
SUBDIRS += quartz
endif

View File

@ -23,16 +23,20 @@
# include <OpenGL/gl.h>
# include <OpenGL/glext.h>
#else
# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
# if defined(GLES_VARIETY_S3C6410)
# include <GLES2/gl2.h>
# elif defined(GLES_VARIETY_SGX)
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# endif
# ifdef _EVAS_ENGINE_SDL_H
# include <SDL/SDL_opengles.h>
# else
# include <GL/gl.h>
# include <GL/glext.h>
# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
# if defined(GLES_VARIETY_S3C6410)
# include <GLES2/gl2.h>
# elif defined(GLES_VARIETY_SGX)
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# endif
# else
# include <GL/gl.h>
# include <GL/glext.h>
# endif
# endif
#endif

View File

@ -1,27 +1,22 @@
#ifndef EVAS_ENGINE_H
#define EVAS_ENGINE_H
#define _EVAS_ENGINE_SDL_H
#include "config.h"
#include <SDL/SDL.h>
#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
# if defined(GLES_VARIETY_S3C6410)
# include <EGL/egl.h>
# include <GLES2/gl2.h>
# elif defined(GLES_VARIETY_SGX)
# include <EGL/egl.h>
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# endif
# include <EGL/egl.h>
# include <SDL/SDL_opengles.h>
# ifdef HAVE_SDL_FLAG_OPENGLES
# define EVAS_SDL_GL_FLAG SDL_OPENGLES
# else
# define EVAS_SDL_GL_FLAG SDL_OPENGL /* This probably won't work? */
# endif
#else
# include <SDL/SDL_opengl.h>
# define EVAS_SDL_GL_FLAG SDL_OPENGL
#endif
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#include <GL/gl.h>
#include "evas_common.h"
#include "evas_private.h"
#include "evas_gl_common.h"