diff --git a/extras/JuceDemo/Builds/Android/src/com/juce/JuceDemo.java b/extras/JuceDemo/Builds/Android/src/com/juce/JuceDemo.java index 395a40db96..bdd89377cd 100644 --- a/extras/JuceDemo/Builds/Android/src/com/juce/JuceDemo.java +++ b/extras/JuceDemo/Builds/Android/src/com/juce/JuceDemo.java @@ -29,6 +29,8 @@ import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Context; +import android.content.Intent; +import android.net.Uri; import android.os.Bundle; import android.view.*; import android.graphics.*; diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index c3beb57c5c..42a671ba61 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -140,7 +140,7 @@ const Type findMinimum (const Type* data, int numValues) return result; } -/** Scans an array of values, returning the minimum value that it contains. */ +/** Scans an array of values, returning the maximum value that it contains. */ template const Type findMaximum (const Type* values, int numValues) { @@ -152,7 +152,7 @@ const Type findMaximum (const Type* values, int numValues) while (--numValues > 0) // (> 0 rather than >= 0 because we've already taken the first sample) { const Type& v = *values++; - if (result > v) result = v; + if (result < v) result = v; } return result; diff --git a/modules/juce_core/native/java/JuceAppActivity.java b/modules/juce_core/native/java/JuceAppActivity.java index de324f94ec..5aef477638 100644 --- a/modules/juce_core/native/java/JuceAppActivity.java +++ b/modules/juce_core/native/java/JuceAppActivity.java @@ -29,6 +29,8 @@ import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Context; +import android.content.Intent; +import android.net.Uri; import android.os.Bundle; import android.view.*; import android.graphics.*; diff --git a/modules/juce_opengl/juce_opengl.cpp b/modules/juce_opengl/juce_opengl.cpp index dc1f3d112e..628f1aa66a 100644 --- a/modules/juce_opengl/juce_opengl.cpp +++ b/modules/juce_opengl/juce_opengl.cpp @@ -117,7 +117,6 @@ #ifndef GL_GLEXT_PROTOTYPES #define GL_GLEXT_PROTOTYPES 1 #endif - #include #include #endif @@ -131,14 +130,24 @@ namespace juce void OpenGLExtensionFunctions::initialise() { #if JUCE_WINDOWS || JUCE_LINUX - #define JUCE_INIT_GL_FUNCTION(name, returnType, params, callparams) name = (type_ ## name) OpenGLHelpers::getExtensionFunction (#name); + #define JUCE_INIT_GL_FUNCTION(name, returnType, params, callparams) \ + name = (type_ ## name) OpenGLHelpers::getExtensionFunction (#name); + JUCE_GL_EXTENSION_FUNCTIONS (JUCE_INIT_GL_FUNCTION) #undef JUCE_INIT_GL_FUNCTION #endif } + struct XYZ + { + XYZ (const char* name) { DBG (name); } + ~XYZ() { DBG ("out"); } + }; + #if JUCE_OPENGL_ES - #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) inline returnType OpenGLExtensionFunctions::name params { return ::name callparams; } + #define JUCE_DECLARE_GL_FUNCTION(name, returnType, params, callparams) \ + inline returnType OpenGLExtensionFunctions::name params { XYZ xx (#name); return ::name callparams; } + JUCE_GL_EXTENSION_FUNCTIONS (JUCE_DECLARE_GL_FUNCTION) #undef JUCE_DECLARE_GL_FUNCTION #endif diff --git a/modules/juce_opengl/juce_opengl.h b/modules/juce_opengl/juce_opengl.h index 33729e80e6..e746624b8c 100644 --- a/modules/juce_opengl/juce_opengl.h +++ b/modules/juce_opengl/juce_opengl.h @@ -33,6 +33,7 @@ #if JUCE_IOS || JUCE_ANDROID #define JUCE_OPENGL_ES 1 + #define JUCE_USE_OPENGL_FIXED_FUNCTION 0 #endif #if JUCE_WINDOWS @@ -63,7 +64,7 @@ #include #include "OpenGL/glext.h" #elif JUCE_ANDROID - #include + #include #endif #if (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX) && ! defined (JUCE_USE_OPENGL_SHADERS) diff --git a/modules/juce_opengl/native/juce_MissingGLDefinitions.h b/modules/juce_opengl/native/juce_MissingGLDefinitions.h index 98c8e42384..674e236da5 100644 --- a/modules/juce_opengl/native/juce_MissingGLDefinitions.h +++ b/modules/juce_opengl/native/juce_MissingGLDefinitions.h @@ -50,7 +50,7 @@ namespace #endif #ifndef GL_DEPTH24_STENCIL8 - #define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES + enum { GL_DEPTH24_STENCIL8 = 0x88F0 }; #endif #if JUCE_WINDOWS