From aafd24e6141544dc291be10a4832b5d373565bca Mon Sep 17 00:00:00 2001 From: guanghuafan Date: Fri, 10 Mar 2017 12:45:29 -0800 Subject: [PATCH] fix OpenGL2 min android version --- gles3jni/app/build.gradle | 2 +- gles3jni/app/src/main/cpp/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gles3jni/app/build.gradle b/gles3jni/app/build.gradle index fd92e69f..1db144a4 100644 --- a/gles3jni/app/build.gradle +++ b/gles3jni/app/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'com.android.application' def platformVersion = 18 //openGLES 3 min Version -//def platformVersion = 11 //openGLES 2 min version +//def platformVersion = 12 //openGLES 2 min version android { compileSdkVersion 25 diff --git a/gles3jni/app/src/main/cpp/CMakeLists.txt b/gles3jni/app/src/main/cpp/CMakeLists.txt index c9384b3c..7bb79ea7 100644 --- a/gles3jni/app/src/main/cpp/CMakeLists.txt +++ b/gles3jni/app/src/main/cpp/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.4.1) # set targetPlatform, will be passed in from gradle when this sample is completed # openGL Supportability # platform status -# (0 11) ES2/ES3 not supported -# [11, 18) ES2 only, for ES3, app do dynamic load +# (0 12) ES2/ES3 not supported +# [12, 18) ES2 only, for ES3, app do dynamic load # [18, 24) ES2 & ES3 # [24, infinite) ES2 & ES3 & Vulkan @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.4.1) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -Wall") -if (${ANDROID_PLATFORM_LEVEL} LESS 11) +if (${ANDROID_PLATFORM_LEVEL} LESS 12) message(FATAL_ERROR "OpenGL 2 is not supported before API level 11 (currently using ${ANDROID_PLATFORM_LEVEL}).") return() elseif (${ANDROID_PLATFORM_LEVEL} LESS 18)