Permalink
Browse files

Raspbian hard float support and EGL options changes

  • Loading branch information...
reefab committed Jul 11, 2012
1 parent 056e2a3 commit 654d4b062f281921c40aed6fbf873284554d2d7b
Showing with 20 additions and 6 deletions.
  1. +13 −1 Makefile
  2. +7 −5 src/egl/eglport.c
View
@@ -94,6 +94,10 @@ WIZ := no
# Raspberry PI
PI := yes
+# if you are using Raspbian or another distribution with hardware
+# floating point support, set that to yes
+HARDFLOAT := yes
+
# ------------------------------------------------------ #
# Those variables can be filled to configure the build
@@ -181,7 +185,15 @@ endif
ifeq ($(PI),yes)
WITH_GLES = yes
WITH_STATICQGL = yes
-CFLAGS += -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp -DUSE_EGL_RAW -DUSE_VCHIQ_ARM -DUSE_GLES2 -DPI -DEGL_VERSION_1_2
+CFLAGS += -mtune=arm1176jzf-s -mfpu=vfp -DUSE_EGL_RAW -DUSE_VCHIQ_ARM -DUSE_GLES2 -DPI -DEGL_VERSION_1_2
+
+
+endif
+
+ifeq ($(HARDFLOAT), yes)
+CFLAGS += -mfloat-abi=hard
+else
+CFLAGS += -mfloat-abi=softfp
endif
# ----------
View
@@ -402,17 +402,19 @@ int8_t FindAppropriateEGLConfigs( void )
#if defined(PI)
ConfigAttribs[attrib++] = EGL_RED_SIZE;
- ConfigAttribs[attrib++] = 8;
+ ConfigAttribs[attrib++] = 5;
ConfigAttribs[attrib++] = EGL_GREEN_SIZE;
- ConfigAttribs[attrib++] = 8;
+ ConfigAttribs[attrib++] = 6;
ConfigAttribs[attrib++] = EGL_BLUE_SIZE;
- ConfigAttribs[attrib++] = 8;
+ ConfigAttribs[attrib++] = 5;
ConfigAttribs[attrib++] = EGL_ALPHA_SIZE;
- ConfigAttribs[attrib++] = 8;
+ ConfigAttribs[attrib++] = 0;
ConfigAttribs[attrib++] = EGL_SURFACE_TYPE;
ConfigAttribs[attrib++] = EGL_WINDOW_BIT;
ConfigAttribs[attrib++] = EGL_DEPTH_SIZE;
- ConfigAttribs[attrib++] = 24;
+ ConfigAttribs[attrib++] = 16;
+ ConfigAttribs[attrib++] = EGL_STENCIL_SIZE;
+ ConfigAttribs[attrib++] = 0;
ConfigAttribs[attrib++] = EGL_RENDERABLE_TYPE;
ConfigAttribs[attrib++] = EGL_OPENGL_ES2_BIT;
ConfigAttribs[attrib++] = EGL_NONE;

0 comments on commit 654d4b0

Please sign in to comment.