| @@ -62,6 +62,8 @@ public: | |||||
| if (getInternetNeeded().toString().isEmpty()) | if (getInternetNeeded().toString().isEmpty()) | ||||
| getInternetNeeded() = true; | getInternetNeeded() = true; | ||||
| androidDynamicLibs.add ("GLESv1_CM"); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -241,9 +243,23 @@ private: | |||||
| << " LOCAL_CPPFLAGS += " << createCPPFlags (false) << newLine | << " LOCAL_CPPFLAGS += " << createCPPFlags (false) << newLine | ||||
| << "endif" << newLine | << "endif" << newLine | ||||
| << newLine | << newLine | ||||
| << getDynamicLibs() | |||||
| << newLine | |||||
| << "include $(BUILD_SHARED_LIBRARY)" << newLine; | << "include $(BUILD_SHARED_LIBRARY)" << newLine; | ||||
| } | } | ||||
| String getDynamicLibs() | |||||
| { | |||||
| if (androidDynamicLibs.size() == 0) | |||||
| return String::empty; | |||||
| String flags ("LOCAL_LDLIBS :="); | |||||
| for (int i = 0; i < androidDynamicLibs.size(); ++i) | |||||
| flags << " -l" << androidDynamicLibs[i]; | |||||
| return flags + newLine; | |||||
| } | |||||
| String createIncludePathFlags (const Project::BuildConfiguration& config) | String createIncludePathFlags (const Project::BuildConfiguration& config) | ||||
| { | { | ||||
| String flags; | String flags; | ||||
| @@ -144,6 +144,9 @@ public: | |||||
| String msvcPostBuildCommand, msvcPostBuildOutputs; | String msvcPostBuildCommand, msvcPostBuildOutputs; | ||||
| String msvcPreBuildDescription, msvcPreBuildCommand; | String msvcPreBuildDescription, msvcPreBuildCommand; | ||||
| //============================================================================== | |||||
| StringArray androidDynamicLibs; | |||||
| //============================================================================== | //============================================================================== | ||||
| StringArray extraSearchPaths; | StringArray extraSearchPaths; | ||||
| @@ -52,4 +52,6 @@ else | |||||
| LOCAL_CPPFLAGS += -fsigned-char -fexceptions -frtti -I "../../JuceLibraryCode" -Os -D "JUCE_ANDROID=1" -D "NDEBUG=1" -D "JUCE_UNIT_TESTS=1" -D "JUCER_ANDROID_7F0E4A25=1" | LOCAL_CPPFLAGS += -fsigned-char -fexceptions -frtti -I "../../JuceLibraryCode" -Os -D "JUCE_ANDROID=1" -D "NDEBUG=1" -D "JUCE_UNIT_TESTS=1" -D "JUCER_ANDROID_7F0E4A25=1" | ||||
| endif | endif | ||||
| LOCAL_LDLIBS := -lGLESv1_CM | |||||
| include $(BUILD_SHARED_LIBRARY) | include $(BUILD_SHARED_LIBRARY) | ||||
| @@ -114,6 +114,10 @@ | |||||
| #undef SIZEOF | #undef SIZEOF | ||||
| #undef KeyPress | #undef KeyPress | ||||
| //============================================================================== | |||||
| #elif JUCE_ANDROID | |||||
| #include <GLES/glext.h> | |||||
| #endif | #endif | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -65,6 +65,8 @@ | |||||
| #elif JUCE_MAC | #elif JUCE_MAC | ||||
| #include <OpenGL/gl.h> | #include <OpenGL/gl.h> | ||||
| #include "OpenGL/glext.h" | #include "OpenGL/glext.h" | ||||
| #elif JUCE_ANDROID | |||||
| #include <GLES/gl.h> | |||||
| #endif | #endif | ||||
| #ifndef GL_BGRA_EXT | #ifndef GL_BGRA_EXT | ||||