Revision 94f6d472
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/EffectQueuePostprocess.java | ||
---|---|---|
123 | 123 |
try |
124 | 124 |
{ |
125 | 125 |
mBlur1Program = new DistortedProgram(blur1VertexStream,blur1FragmentStream, |
126 |
Distorted.glslVersion,
|
|
127 |
Distorted.glslVersion+"#define MAX_BLUR "+MAX_BLUR);
|
|
126 |
Distorted.GLSL_VERSION,
|
|
127 |
Distorted.GLSL_VERSION + "#define MAX_BLUR "+MAX_BLUR, Distorted.GLSL);
|
|
128 | 128 |
} |
129 | 129 |
catch(Exception e) |
130 | 130 |
{ |
... | ... | |
145 | 145 |
try |
146 | 146 |
{ |
147 | 147 |
mBlur2Program = new DistortedProgram(blur2VertexStream,blur2FragmentStream, |
148 |
Distorted.glslVersion,
|
|
149 |
Distorted.glslVersion + "#define MAX_BLUR "+MAX_BLUR);
|
|
148 |
Distorted.GLSL_VERSION,
|
|
149 |
Distorted.GLSL_VERSION + "#define MAX_BLUR "+MAX_BLUR, Distorted.GLSL);
|
|
150 | 150 |
} |
151 | 151 |
catch(Exception e) |
152 | 152 |
{ |
153 | 153 |
android.util.Log.e("EFFECTS", "exception trying to compile BLUR2 program: "+e.getMessage()); |
154 |
throw new RuntimeException(e.getMessage()); |
|
154 |
// run anyway as compiling Blur2 WILL fail on OpenGL 2.0 contexts |
|
155 |
mBlur2Program = mBlur1Program; |
|
155 | 156 |
} |
156 | 157 |
|
157 | 158 |
int blur2ProgramH = mBlur2Program.getProgramHandle(); |
Also available in: Unified diff
Make it more flexible; now it can run almost all apps on OpenGL 2.0 contexts; OpenGL 3.0 ( with GLSL 3.00) required for POSTPROCESSING.