summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorxcomputerman <xcomputerman>2010-01-29 06:12:35 +0000
committerxcomputerman <xcomputerman@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2010-01-29 06:12:35 +0000
commita61baea31e8f537cf86841b78a4eb28b652cfa6c (patch)
tree21b80574c45e40cb8f59ef576c6b42289ce7f5b6 /legacy
parentdcd3b345e5b54bd9030567eca58d403b9252f147 (diff)
Various fixes to enable building SDL/OpenGLES
SVN revision: 45692
Diffstat (limited to '')
-rw-r--r--legacy/evas/configure.ac32
-rw-r--r--legacy/evas/m4/evas_check_engine.m42
-rw-r--r--legacy/evas/src/modules/engines/Makefile.am3
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_common.h22
-rw-r--r--legacy/evas/src/modules/engines/gl_sdl/evas_engine.h17
5 files changed, 47 insertions, 29 deletions
diff --git a/legacy/evas/configure.ac b/legacy/evas/configure.ac
index f0452779e1..5594b89cf3 100644
--- a/legacy/evas/configure.ac
+++ b/legacy/evas/configure.ac
@@ -508,20 +508,26 @@ EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}],
508 508
509# common gl 509# common gl
510have_evas_engine_gl_common="no" 510have_evas_engine_gl_common="no"
511if test "x$have_evas_engine_gl_x11" = "xyes" -o "x$have_evas_engine_gl_glew" = "xyes" \ 511if test "x$have_evas_engine_gl_x11" = "xyes"; then
512 -o "x$have_evas_gl_sdl" ="xyes"; then
513 AC_DEFINE(BUILD_ENGINE_GL_COMMON, 1, [Generic OpenGL Rendering Support])
514 have_evas_engine_gl_common="yes" 512 have_evas_engine_gl_common="yes"
515 evas_engine_gl_common_libs=""
516fi 513fi
517 514
518if test "x$have_evas_engine_gl_glew" = "xyes" ; then 515if test "x$have_evas_engine_gl_glew" = "xyes"; then
519 have_evas_engine_gl_common="yes" 516 have_evas_engine_gl_common="yes"
517fi
518
519if test "x$have_evas_engine_gl_sdl" = "xyes"; then
520 have_evas_engine_gl_common="yes"
521fi
522
523if test "x$have_evas_engine_gl_common" = "xyes"; then
520 evas_engine_gl_common_libs="" 524 evas_engine_gl_common_libs=""
525 AC_DEFINE(BUILD_ENGINE_GL_COMMON, [1], [Generic OpenGL Rendering Support])
521fi 526fi
527
522AC_SUBST([evas_engine_gl_common_libs]) 528AC_SUBST([evas_engine_gl_common_libs])
523 529
524AM_CONDITIONAL(BUILD_ENGINE_GL_COMMON, test "x$have_evas_engine_gl_common" = "xyes") 530AM_CONDITIONAL(BUILD_ENGINE_GL_COMMON, [test "x$have_evas_engine_gl_common" = "xyes"])
525 531
526# gl_sdl 532# gl_sdl
527if test "x$have_evas_engine_gl_sdl" = "xyes"; then 533if test "x$have_evas_engine_gl_sdl" = "xyes"; then
@@ -1345,7 +1351,12 @@ echo "Engines:"
1345echo " Software Memory Buffer.....: $have_evas_engine_buffer" 1351echo " Software Memory Buffer.....: $have_evas_engine_buffer"
1346echo " Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)" 1352echo " Software X11...............: $have_evas_engine_software_x11 (Xlib: $have_evas_engine_software_xlib) (XCB: $have_evas_engine_software_xcb)"
1347echo " XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)" 1353echo " XRender X11................: $have_evas_engine_xrender_x11 (XCB: $have_evas_engine_xrender_xcb)"
1348echo " OpenGL X11.................: $have_evas_engine_gl_x11 (GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)" 1354echo -n " OpenGL X11.................: $have_evas_engine_gl_x11 "
1355if test "x$have_evas_engine_gl_x11" = "xyes"; then
1356 echo "(GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
1357else
1358 echo
1359fi
1349#echo " Cairo X11..................: $have_evas_engine_cairo_x11" 1360#echo " Cairo X11..................: $have_evas_engine_cairo_x11"
1350echo " Software GDI...............: $have_evas_engine_software_gdi" 1361echo " Software GDI...............: $have_evas_engine_software_gdi"
1351echo " Software DirectDraw........: $have_evas_engine_software_ddraw" 1362echo " Software DirectDraw........: $have_evas_engine_software_ddraw"
@@ -1353,7 +1364,12 @@ echo " Direct3d...................: $have_evas_engine_direct3d"
1353echo " Quartz.....................: $have_evas_engine_quartz" 1364echo " Quartz.....................: $have_evas_engine_quartz"
1354echo " OpenGL Glew................: $have_evas_engine_gl_glew" 1365echo " OpenGL Glew................: $have_evas_engine_gl_glew"
1355echo " Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)" 1366echo " Software SDL...............: $have_evas_engine_software_sdl (primitive: $sdl_primitive)"
1356echo " OpenGL SDL.................: $have_evas_engine_gl_sdl" 1367echo -n " OpenGL SDL.................: $have_evas_engine_gl_sdl "
1368if test "x$have_evas_engine_gl_sdl" = "xyes"; then
1369 echo "(GLES: $gl_flavor_gles) (SGX: $gles_variety_sgx) (s3c6410: $gles_variety_s3c6410)"
1370else
1371 echo
1372fi
1357echo " Software Framebuffer.......: $have_evas_engine_fb" 1373echo " Software Framebuffer.......: $have_evas_engine_fb"
1358echo " DirectFB...................: $have_evas_engine_directfb" 1374echo " DirectFB...................: $have_evas_engine_directfb"
1359#echo " Software Qtopia............: $have_evas_engine_software_qtopia" 1375#echo " Software Qtopia............: $have_evas_engine_software_qtopia"
diff --git a/legacy/evas/m4/evas_check_engine.m4 b/legacy/evas/m4/evas_check_engine.m4
index 416cf90737..d507222433 100644
--- a/legacy/evas/m4/evas_check_engine.m4
+++ b/legacy/evas/m4/evas_check_engine.m4
@@ -520,7 +520,7 @@ if test "x${have_dep}" = "xyes" ; then
520 evas_engine_[]$1[]_libs="${SDL_LIBS} -lGL -lpthread" 520 evas_engine_[]$1[]_libs="${SDL_LIBS} -lGL -lpthread"
521 evas_engine_gl_common_libs="-lGL -lpthread" 521 evas_engine_gl_common_libs="-lGL -lpthread"
522else 522else
523 AC_CHECK_HEADERS([EGL/egl.h], [have_egl="yes"]) 523 AC_CHECK_HEADERS([SDL/SDL_opengles.h EGL/egl.h], [have_egl="yes"])
524 if test "x${have_egl}" = "xyes" ; then 524 if test "x${have_egl}" = "xyes" ; then
525 AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lpthread -lm) 525 AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL -lpthread -lm)
526 if test "x${have_glesv2}" = "xyes" ; then 526 if test "x${have_glesv2}" = "xyes" ; then
diff --git a/legacy/evas/src/modules/engines/Makefile.am b/legacy/evas/src/modules/engines/Makefile.am
index 7a20c88408..1db0e21e05 100644
--- a/legacy/evas/src/modules/engines/Makefile.am
+++ b/legacy/evas/src/modules/engines/Makefile.am
@@ -23,6 +23,9 @@ endif
23if !EVAS_STATIC_BUILD_GL_X11 23if !EVAS_STATIC_BUILD_GL_X11
24SUBDIRS += gl_common gl_x11 24SUBDIRS += gl_common gl_x11
25endif 25endif
26if !EVAS_STATIC_BUILD_GL_SDL
27SUBDIRS += gl_common gl_sdl
28endif
26if !EVAS_STATIC_BUILD_QUARTZ 29if !EVAS_STATIC_BUILD_QUARTZ
27SUBDIRS += quartz 30SUBDIRS += quartz
28endif 31endif
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
index 8ec2b2b78b..13df063211 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
@@ -23,16 +23,20 @@
23# include <OpenGL/gl.h> 23# include <OpenGL/gl.h>
24# include <OpenGL/glext.h> 24# include <OpenGL/glext.h>
25#else 25#else
26# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) 26# ifdef _EVAS_ENGINE_SDL_H
27# if defined(GLES_VARIETY_S3C6410) 27# include <SDL/SDL_opengles.h>
28# include <GLES2/gl2.h>
29# elif defined(GLES_VARIETY_SGX)
30# include <GLES2/gl2.h>
31# include <GLES2/gl2ext.h>
32# endif
33# else 28# else
34# include <GL/gl.h> 29# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
35# include <GL/glext.h> 30# if defined(GLES_VARIETY_S3C6410)
31# include <GLES2/gl2.h>
32# elif defined(GLES_VARIETY_SGX)
33# include <GLES2/gl2.h>
34# include <GLES2/gl2ext.h>
35# endif
36# else
37# include <GL/gl.h>
38# include <GL/glext.h>
39# endif
36# endif 40# endif
37#endif 41#endif
38 42
diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h
index 92e2786274..36d91b497b 100644
--- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h
+++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.h
@@ -1,27 +1,22 @@
1#ifndef EVAS_ENGINE_H 1#ifndef EVAS_ENGINE_H
2#define EVAS_ENGINE_H 2#define EVAS_ENGINE_H
3 3
4#define _EVAS_ENGINE_SDL_H
5
4#include "config.h" 6#include "config.h"
7#include <SDL/SDL.h>
5#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) 8#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
6# if defined(GLES_VARIETY_S3C6410) 9# include <EGL/egl.h>
7# include <EGL/egl.h> 10# include <SDL/SDL_opengles.h>
8# include <GLES2/gl2.h>
9# elif defined(GLES_VARIETY_SGX)
10# include <EGL/egl.h>
11# include <GLES2/gl2.h>
12# include <GLES2/gl2ext.h>
13# endif
14# ifdef HAVE_SDL_FLAG_OPENGLES 11# ifdef HAVE_SDL_FLAG_OPENGLES
15# define EVAS_SDL_GL_FLAG SDL_OPENGLES 12# define EVAS_SDL_GL_FLAG SDL_OPENGLES
16# else 13# else
17# define EVAS_SDL_GL_FLAG SDL_OPENGL /* This probably won't work? */ 14# define EVAS_SDL_GL_FLAG SDL_OPENGL /* This probably won't work? */
18# endif 15# endif
19#else 16#else
17# include <SDL/SDL_opengl.h>
20# define EVAS_SDL_GL_FLAG SDL_OPENGL 18# define EVAS_SDL_GL_FLAG SDL_OPENGL
21#endif 19#endif
22#include <SDL/SDL.h>
23#include <SDL/SDL_opengl.h>
24#include <GL/gl.h>
25#include "evas_common.h" 20#include "evas_common.h"
26#include "evas_private.h" 21#include "evas_private.h"
27#include "evas_gl_common.h" 22#include "evas_gl_common.h"