| @@ -29,6 +29,8 @@ import android.app.Activity; | |||||
| import android.app.AlertDialog; | import android.app.AlertDialog; | ||||
| import android.content.DialogInterface; | import android.content.DialogInterface; | ||||
| import android.content.Context; | import android.content.Context; | ||||
| import android.content.Intent; | |||||
| import android.net.Uri; | |||||
| import android.os.Bundle; | import android.os.Bundle; | ||||
| import android.view.*; | import android.view.*; | ||||
| import android.graphics.*; | import android.graphics.*; | ||||
| @@ -140,7 +140,7 @@ const Type findMinimum (const Type* data, int numValues) | |||||
| return result; | 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 <typename Type> | template <typename Type> | ||||
| const Type findMaximum (const Type* values, int numValues) | 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) | while (--numValues > 0) // (> 0 rather than >= 0 because we've already taken the first sample) | ||||
| { | { | ||||
| const Type& v = *values++; | const Type& v = *values++; | ||||
| if (result > v) result = v; | |||||
| if (result < v) result = v; | |||||
| } | } | ||||
| return result; | return result; | ||||
| @@ -29,6 +29,8 @@ import android.app.Activity; | |||||
| import android.app.AlertDialog; | import android.app.AlertDialog; | ||||
| import android.content.DialogInterface; | import android.content.DialogInterface; | ||||
| import android.content.Context; | import android.content.Context; | ||||
| import android.content.Intent; | |||||
| import android.net.Uri; | |||||
| import android.os.Bundle; | import android.os.Bundle; | ||||
| import android.view.*; | import android.view.*; | ||||
| import android.graphics.*; | import android.graphics.*; | ||||
| @@ -117,7 +117,6 @@ | |||||
| #ifndef GL_GLEXT_PROTOTYPES | #ifndef GL_GLEXT_PROTOTYPES | ||||
| #define GL_GLEXT_PROTOTYPES 1 | #define GL_GLEXT_PROTOTYPES 1 | ||||
| #endif | #endif | ||||
| #include <GLES/glext.h> | |||||
| #include <GLES2/gl2.h> | #include <GLES2/gl2.h> | ||||
| #endif | #endif | ||||
| @@ -131,14 +130,24 @@ namespace juce | |||||
| void OpenGLExtensionFunctions::initialise() | void OpenGLExtensionFunctions::initialise() | ||||
| { | { | ||||
| #if JUCE_WINDOWS || JUCE_LINUX | #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) | JUCE_GL_EXTENSION_FUNCTIONS (JUCE_INIT_GL_FUNCTION) | ||||
| #undef JUCE_INIT_GL_FUNCTION | #undef JUCE_INIT_GL_FUNCTION | ||||
| #endif | #endif | ||||
| } | } | ||||
| struct XYZ | |||||
| { | |||||
| XYZ (const char* name) { DBG (name); } | |||||
| ~XYZ() { DBG ("out"); } | |||||
| }; | |||||
| #if JUCE_OPENGL_ES | #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) | JUCE_GL_EXTENSION_FUNCTIONS (JUCE_DECLARE_GL_FUNCTION) | ||||
| #undef JUCE_DECLARE_GL_FUNCTION | #undef JUCE_DECLARE_GL_FUNCTION | ||||
| #endif | #endif | ||||
| @@ -33,6 +33,7 @@ | |||||
| #if JUCE_IOS || JUCE_ANDROID | #if JUCE_IOS || JUCE_ANDROID | ||||
| #define JUCE_OPENGL_ES 1 | #define JUCE_OPENGL_ES 1 | ||||
| #define JUCE_USE_OPENGL_FIXED_FUNCTION 0 | |||||
| #endif | #endif | ||||
| #if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||
| @@ -63,7 +64,7 @@ | |||||
| #include <OpenGL/gl.h> | #include <OpenGL/gl.h> | ||||
| #include "OpenGL/glext.h" | #include "OpenGL/glext.h" | ||||
| #elif JUCE_ANDROID | #elif JUCE_ANDROID | ||||
| #include <GLES/gl.h> | |||||
| #include <GLES2/gl2.h> | |||||
| #endif | #endif | ||||
| #if (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX) && ! defined (JUCE_USE_OPENGL_SHADERS) | #if (JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX) && ! defined (JUCE_USE_OPENGL_SHADERS) | ||||
| @@ -50,7 +50,7 @@ namespace | |||||
| #endif | #endif | ||||
| #ifndef GL_DEPTH24_STENCIL8 | #ifndef GL_DEPTH24_STENCIL8 | ||||
| #define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES | |||||
| enum { GL_DEPTH24_STENCIL8 = 0x88F0 }; | |||||
| #endif | #endif | ||||
| #if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||