From 082b15969f3f1028b3418b366ece85c31883c632 Mon Sep 17 00:00:00 2001 From: hogliux Date: Thu, 28 Jan 2016 17:04:16 +0000 Subject: [PATCH] Fix OpenGL 2D custom shader crash on newer Android devices --- modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp index 90dcf2417d..3da415b021 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp @@ -1853,7 +1853,7 @@ struct CustomProgram : public ReferenceCountedObject, OpenGLGraphicsContextCustomShader::OpenGLGraphicsContextCustomShader (const String& fragmentShaderCode) : code (String (JUCE_DECLARE_VARYING_COLOUR JUCE_DECLARE_VARYING_PIXELPOS - "\n" JUCE_MEDIUMP " float pixelAlpha = frontColour.a;\n") + fragmentShaderCode), + "\n#define pixelAlpha frontColour.a\n") + fragmentShaderCode), hashName (String::toHexString (fragmentShaderCode.hashCode64()) + "_shader") { }