Browse Source

Fixed an issue where the Projucer would not detect OpenGL ESv3 support correctly on Android

tags/2021-05-28
hogliux 8 years ago
parent
commit
934aa72d6f
2 changed files with 15 additions and 2 deletions
  1. +9
    -1
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h
  2. +6
    -1
      modules/juce_opengl/juce_opengl.h

+ 9
- 1
extras/Projucer/Source/Project Saving/jucer_ProjectExport_Android.h View File

@@ -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;


+ 6
- 1
modules/juce_opengl/juce_opengl.h View File

@@ -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…
Cancel
Save