fixed #1229, reduce the requirement of gles20 branch from NDK android-10 to android-8 level (official android 2.2 image, the lowest version which supports OpenGL ES 2.0), remove EGL dependency.

This commit is contained in:
Walzer 2012-05-05 10:06:41 +08:00
parent 9887be6624
commit f70855e959
3 changed files with 12 additions and 8 deletions

View File

@ -170,8 +170,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ \
LOCAL_EXPORT_LDLIBS := -llog\
-lz \
-lGLESv2 \
-lEGL
-lGLESv2
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ \
$(LOCAL_PATH)/actions \

View File

@ -30,18 +30,23 @@ THE SOFTWARE.
#include "jni/MessageJni.h"
#include <stdlib.h>
#include "CCGL.h"
#include <EGL/egl.h>
#include <android/log.h>
#include "CCGL.h"
PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT = 0;
PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT = 0;
PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT = 0;
#if CC_TEXTURE_ATLAS_USE_VAO
#include <EGL/egl.h>
PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT = 0;
PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT = 0;
PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT = 0;
#endif
void initExtensions() {
#if CC_TEXTURE_ATLAS_USE_VAO
glGenVertexArraysOESEXT = (PFNGLGENVERTEXARRAYSOESPROC)eglGetProcAddress("glGenVertexArraysOES");
glBindVertexArrayOESEXT = (PFNGLBINDVERTEXARRAYOESPROC)eglGetProcAddress("glBindVertexArrayOES");
glDeleteVertexArraysOESEXT = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress("glDeleteVertexArraysOES");
#endif
}
NS_CC_BEGIN

View File

@ -8,4 +8,4 @@
# project structure.
# Project target.
target=android-10
target=android-8