Changeset 1677


Ignore:
Timestamp:
Jul 28, 2012, 1:51:03 AM (11 years ago)
Author:
sam
Message:

build: fix the Raspberry Pi build and add a build script for it.

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/lol-build

    r1586 r1677  
    2424#  - win*-i386
    2525#  - win*-amd64
     26#  - raspi-arm
    2627#
    2728
     
    131132            cd monsterz/android
    132133            android update project --path .
     134            ;;
     135        raspi-arm)
     136            ./configure --host=arm-bcm2708hardfp-linux-gnueabi CPPFLAGS="-I$RASPI_SDK_ROOT/firmware/opt/vc/include -I$RASPI_SDK_ROOT/firmware/opt/vc/include/interface/vcos/pthreads" LDFLAGS="-L$RASPI_SDK_ROOT/firmware/opt/vc/lib"
    133137            ;;
    134138        nacl-i386)
     
    198202        android-arm)
    199203            ;;
     204        raspi-arm)
     205            ;;
    200206        ps3-ppu)
    201207            ;;
  • trunk/configure.ac

    r1670 r1677  
    170170dnl  Use the Raspberry Pi libraries?
    171171if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
    172 AC_CHECK_HEADER(bcm_host.h,
    173  [AC_MSG_RESULT(yes)
    174   AC_CHECK_LIB(bcm_host, main,
    175    [ac_cv_my_have_gl="yes"
    176     ac_cv_my_stop_looking_for_gl="yes"
    177     AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
    178     GL_LIBS="-lGLESv2_static -lkhrn_static -lvcos -lvchiq_arm -lbcm_host"])],
    179  [AC_MSG_RESULT(no)])
     172  AC_CHECK_HEADERS(bcm_host.h,
     173   [AC_CHECK_LIB(vcos, main,
     174     [ac_cv_my_have_gl="yes"
     175      ac_cv_my_stop_looking_for_gl="yes"
     176      AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
     177      dnl  FIXME: -lEGL does not belong here but the configure test fails
     178      dnl  when cross-compiling, so we add it manually here.
     179      GL_LIBS="-lGLESv2 -lEGL -lvcos -lvchiq_arm -lbcm_host"])])
    180180fi
    181181
    182182dnl  Use the PS3 PSGL?
    183183if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
    184   AC_CHECK_HEADER(PSGL/psgl.h,
     184  AC_CHECK_HEADERS(PSGL/psgl.h,
    185185   [ac_cv_my_have_gl="yes"
    186186    ac_cv_my_stop_looking_for_gl="yes"])
     
    352352
    353353
    354 dnl Use EGL?
     354dnl  Use EGL?
    355355ac_cv_my_have_egl="no"
    356356PKG_CHECK_MODULES(EGL, egl, [ac_cv_my_have_egl="yes"], [:])
     
    359359  EGL_LIBS="${EGL_LIBS} -lX11"
    360360fi
    361 dnl Use the Raspberry Pi libraries?
    362 AC_CHECK_LIB(EGL_static, main,
     361AC_CHECK_LIB(EGL, main,
    363362 [ac_cv_my_have_egl="yes"
    364363  AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl)
    365   EGL_LIBS="-lEGL_static"])
     364  EGL_LIBS="-lEGL"])
     365dnl  Raspberry Pi is different, check for it with extra libs; also we
     366dnl  look for a different function to bypass autoconf caching
     367AC_CHECK_LIB(EGL, eglGetDisplay,
     368 [ac_cv_my_have_egl="yes"
     369  AC_DEFINE(USE_EGL, 1, Define to 1 to use libegl)
     370  EGL_LIBS="-lEGL -lvcos -lvchiq_arm -lbcm_host -lGLESv2"],
     371 [:],
     372 [-lvcos -lvchiq_arm -lbcm_host -lGLESv2])
    366373AM_CONDITIONAL(USE_EGL, test "${ac_cv_my_have_egl}" != "no")
    367374
  • trunk/tutorial/11_fractal.cpp

    r1669 r1677  
    4040static GLenum const TEXTURE_FORMAT = GL_BGRA;
    4141static GLenum const TEXTURE_TYPE = GL_UNSIGNED_INT_8_8_8_8_REV;
    42 #elif defined __native_client__
     42#elif defined __native_client__ || defined HAVE_GLES_2X
    4343static GLint const INTERNAL_FORMAT = GL_RGBA;
    4444static GLenum const TEXTURE_FORMAT = GL_RGBA;
Note: See TracChangeset for help on using the changeset viewer.