Merge pull request #94 from notaz/arm_linux

Pandora GL fixes
This commit is contained in:
Squarepusher 2012-12-12 17:33:32 -08:00
commit e883762f33
4 changed files with 32 additions and 16 deletions

View File

@ -203,7 +203,7 @@ ifeq ($(HAVE_VG), 1)
endif
ifeq ($(HAVE_VIDEOCORE), 1)
LIBS += -lOpenVG -lGLESv2 -lEGL -lbcm_host -lvcos -lvchiq_arm
LIBS += -lbcm_host -lvcos -lvchiq_arm
endif
ifeq ($(HAVE_XVIDEO), 1)

View File

@ -177,9 +177,9 @@ static bool gfx_ctx_init(void)
#define EGL_ATTRIBS_BASE \
EGL_SURFACE_TYPE, EGL_WINDOW_BIT, \
EGL_RED_SIZE, 8, \
EGL_GREEN_SIZE, 8, \
EGL_BLUE_SIZE, 8, \
EGL_RED_SIZE, 0, \
EGL_GREEN_SIZE, 0, \
EGL_BLUE_SIZE, 0, \
EGL_DEPTH_SIZE, 0, \
EGL_STENCIL_SIZE, 0

View File

@ -312,6 +312,10 @@ extern PFNGLACTIVETEXTUREPROC pglActiveTexture;
#define RARCH_GL_FORMAT32 GL_UNSIGNED_INT_8_8_8_8_REV
#define RARCH_GL_FORMAT16 GL_RGB5
#elif defined(HAVE_OPENGLES)
// Imgtec/SGX headers have this missing.
#ifndef GL_BGRA_EXT
#define GL_BGRA_EXT 0x80E1
#endif
#define RARCH_GL_INTERNAL_FORMAT32 GL_BGRA_EXT
#define RARCH_GL_INTERNAL_FORMAT16 GL_RGB
#define RARCH_GL_TEXTURE_TYPE32 GL_BGRA_EXT

View File

@ -17,11 +17,17 @@ check_lib VIDEOCORE -lbcm_host bcm_host_init "-lvcos -lvchiq_arm"
if [ "$HAVE_VIDEOCORE" = 'yes' ]; then
[ -d /opt/vc/include ] && add_include_dirs /opt/vc/include
[ -d /opt/vc/include/interface/vcos/pthreads ] && add_include_dirs /opt/vc/include/interface/vcos/pthreads
HAVE_GLES='yes'
HAVE_VG='yes'
HAVE_EGL='yes'
else
HAVE_GLES='auto'
EXTRA_GL_LIBS="-lGLESv2 -lbcm_host -lvcos -lvchiq_arm"
fi
if [ "$HAVE_EGL" != "no" ]; then
check_pkgconf EGL egl
# some systems have EGL libs, but no pkgconfig
if [ "$HAVE_EGL" = "no" ]; then
HAVE_EGL=auto && check_lib EGL "-lEGL $EXTRA_GL_LIBS"
[ "$HAVE_EGL" = "yes" ] && EGL_LIBS=-lEGL
fi
fi
if [ "$LIBRETRO" ]; then
@ -149,17 +155,23 @@ fi
check_pkgconf XML libxml-2.0
# On videocore, these libraries will exist without proper pkg-config.
if [ "$HAVE_VIDEOCORE" != "yes" ] && [ "$HAVE_EGL" = "yes" ]; then
if [ "$HAVE_XML" = "yes" ]; then
check_pkgconf GLES glesv2
else
if [ "$HAVE_EGL" = "yes" ]; then
if [ "$HAVE_XML" != "yes" ]; then
echo "Cannot find XML. GLES will not work."
exit 1
fi
check_pkgconf VG vg
elif [ "$HAVE_VIDEOCORE" != "yes" ]; then
if [ "$HAVE_GLES" != "no" ]; then
HAVE_GLES=auto check_pkgconf GLES glesv2
[ "$HAVE_GLES" = "no" ] && HAVE_GLES=auto check_lib GLES "-lGLESv2 $EXTRA_GL_LIBS"
fi
if [ "$HAVE_VG" != "no" ]; then
check_pkgconf VG vg
if [ "$HAVE_VG" = "no" ]; then
HAVE_VG=auto check_lib VG "-lOpenVG $EXTRA_GL_LIBS"
[ "$HAVE_VG" = "yes" ] && VG_LIBS=-lOpenVG
fi
fi
else
HAVE_VG=no
HAVE_GLES=no
fi