mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-15 00:24:19 +00:00
Fixed an issue where the Projucer would not detect OpenGL ESv3 support correctly on Android
This commit is contained in:
parent
fb47a9068a
commit
934aa72d6f
2 changed files with 15 additions and 2 deletions
|
|
@ -1038,6 +1038,9 @@ private:
|
|||
defines.set ("JUCE_ANDROID_ACTIVITY_CLASSNAME", getJNIActivityClassName().replaceCharacter ('/', '_'));
|
||||
defines.set ("JUCE_ANDROID_ACTIVITY_CLASSPATH", "\"" + getJNIActivityClassName() + "\"");
|
||||
|
||||
if (supportsGLv3())
|
||||
defines.set ("JUCE_ANDROID_GL_ES_VERSION_3_0", "1");
|
||||
|
||||
return defines;
|
||||
}
|
||||
|
||||
|
|
@ -1072,7 +1075,7 @@ private:
|
|||
|
||||
libraries.add ("log");
|
||||
libraries.add ("android");
|
||||
libraries.add (androidMinimumSDK.get().getIntValue() >= 18 ? "GLESv3" : "GLESv2");
|
||||
libraries.add (supportsGLv3() ? "GLESv3" : "GLESv2");
|
||||
libraries.add ("EGL");
|
||||
|
||||
return libraries;
|
||||
|
|
@ -1264,6 +1267,11 @@ private:
|
|||
return escapedArray.joinIntoString (", ");
|
||||
}
|
||||
|
||||
bool supportsGLv3() const
|
||||
{
|
||||
return (androidMinimumSDK.get().getIntValue() >= 18);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
Value sdkPath, ndkPath;
|
||||
const File AndroidExecutable;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,12 @@
|
|||
#elif JUCE_ANDROID
|
||||
#include <android/native_window.h>
|
||||
#include <android/native_window_jni.h>
|
||||
#include <GLES2/gl2.h>
|
||||
#if JUCE_ANDROID_GL_ES_VERSION_3_0
|
||||
#define JUCE_OPENGL3 1
|
||||
#include <GLES3/gl3.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#endif
|
||||
#include <EGL/egl.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue