mirror of
https://github.com/android/ndk-samples
synced 2025-11-12 20:36:38 +08:00
fix OpenGL2 min android version
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
def platformVersion = 18 //openGLES 3 min Version
|
def platformVersion = 18 //openGLES 3 min Version
|
||||||
//def platformVersion = 11 //openGLES 2 min version
|
//def platformVersion = 12 //openGLES 2 min version
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 25
|
compileSdkVersion 25
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.4.1)
|
|||||||
# set targetPlatform, will be passed in from gradle when this sample is completed
|
# set targetPlatform, will be passed in from gradle when this sample is completed
|
||||||
# openGL Supportability
|
# openGL Supportability
|
||||||
# platform status
|
# platform status
|
||||||
# (0 11) ES2/ES3 not supported
|
# (0 12) ES2/ES3 not supported
|
||||||
# [11, 18) ES2 only, for ES3, app do dynamic load
|
# [12, 18) ES2 only, for ES3, app do dynamic load
|
||||||
# [18, 24) ES2 & ES3
|
# [18, 24) ES2 & ES3
|
||||||
# [24, infinite) ES2 & ES3 & Vulkan
|
# [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_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -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}).")
|
message(FATAL_ERROR "OpenGL 2 is not supported before API level 11 (currently using ${ANDROID_PLATFORM_LEVEL}).")
|
||||||
return()
|
return()
|
||||||
elseif (${ANDROID_PLATFORM_LEVEL} LESS 18)
|
elseif (${ANDROID_PLATFORM_LEVEL} LESS 18)
|
||||||
|
|||||||
Reference in New Issue
Block a user