Browse Source

build: a few iOS build fixes; nowhere near ready though.

legacy
Sam Hocevar sam 11 years ago
parent
commit
1b07850346
2 changed files with 15 additions and 1 deletions
  1. +14
    -0
      build/autotools/m4/lol-gl.m4
  2. +1
    -1
      src/image/codec/ios-image.cpp

+ 14
- 0
build/autotools/m4/lol-gl.m4 View File

@@ -21,6 +21,20 @@ if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
LIBS="$LIBS_save"
fi

if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
LIBS_save="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,OpenGLES"
AC_MSG_CHECKING(for -framework OpenGLES)
AC_TRY_LINK([], [],
[AC_MSG_RESULT(yes)
ac_cv_my_have_gl="yes"
GL_LIBS="${GL_LIBS} -framework OpenGLES"
LOL_TRY_CXXFLAGS(-ObjC++, [CXXFLAGS="${CXXFLAGS} -ObjC++"])
AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)],
[AC_MSG_RESULT(no)])
LIBS="$LIBS_save"
fi

dnl Use the Raspberry Pi libraries?
if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then
AC_CHECK_HEADERS(bcm_host.h,


+ 1
- 1
src/image/codec/ios-image.cpp View File

@@ -65,7 +65,7 @@ bool IosImageData::Open(char const *path)
int w = CGImageGetWidth(image.CGImage);
int h = CGImageGetHeight(image.CGImage);
size = ivec2(w, h);
format = FORMAT_RGBA;
format = Image::FORMAT_RGBA;

CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB();
pixels = (uint8_t *)malloc(w * h * 4);


Loading…
Cancel
Save