Revision 94f6d472
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedEffects.java | ||
---|---|---|
110 | 110 |
final InputStream mainVertStream = resources.openRawResource(R.raw.main_vertex_shader); |
111 | 111 |
final InputStream mainFragStream = resources.openRawResource(R.raw.main_fragment_shader); |
112 | 112 |
|
113 |
String mainVertHeader= Distorted.glslVersion;
|
|
114 |
String mainFragHeader= Distorted.glslVersion;
|
|
113 |
String mainVertHeader= Distorted.GLSL_VERSION;
|
|
114 |
String mainFragHeader= Distorted.GLSL_VERSION;
|
|
115 | 115 |
|
116 | 116 |
EffectNames name; |
117 | 117 |
EffectTypes type; |
... | ... | |
144 | 144 |
//android.util.Log.e("Effects", "vertHeader= "+mainVertHeader); |
145 | 145 |
//android.util.Log.e("Effects", "fragHeader= "+mainFragHeader); |
146 | 146 |
|
147 |
mMainProgram = new DistortedProgram(mainVertStream,mainFragStream, mainVertHeader, mainFragHeader); |
|
147 |
mMainProgram = new DistortedProgram(mainVertStream,mainFragStream, mainVertHeader, mainFragHeader, Distorted.GLSL);
|
|
148 | 148 |
|
149 | 149 |
int mainProgramH = mMainProgram.getProgramHandle(); |
150 | 150 |
EffectQueueFragment.getUniforms(mainProgramH); |
... | ... | |
156 | 156 |
final InputStream blitVertStream = resources.openRawResource(R.raw.blit_vertex_shader); |
157 | 157 |
final InputStream blitFragStream = resources.openRawResource(R.raw.blit_fragment_shader); |
158 | 158 |
|
159 |
String blitVertHeader= (Distorted.glslVersion + "#define NUM_VERTEX 0\n" );
|
|
160 |
String blitFragHeader= (Distorted.glslVersion + "#define NUM_FRAGMENT 0\n");
|
|
159 |
String blitVertHeader= (Distorted.GLSL_VERSION + "#define NUM_VERTEX 0\n" );
|
|
160 |
String blitFragHeader= (Distorted.GLSL_VERSION + "#define NUM_FRAGMENT 0\n");
|
|
161 | 161 |
|
162 | 162 |
try |
163 | 163 |
{ |
164 |
mBlitProgram = new DistortedProgram(blitVertStream,blitFragStream,blitVertHeader,blitFragHeader); |
|
164 |
mBlitProgram = new DistortedProgram(blitVertStream,blitFragStream,blitVertHeader,blitFragHeader, Distorted.GLSL);
|
|
165 | 165 |
} |
166 | 166 |
catch(Exception e) |
167 | 167 |
{ |
... | ... | |
179 | 179 |
|
180 | 180 |
try |
181 | 181 |
{ |
182 |
mDebugProgram = new DistortedProgram(debugVertexStream,debugFragmentStream, Distorted.glslVersion, Distorted.glslVersion);
|
|
182 |
mDebugProgram = new DistortedProgram(debugVertexStream,debugFragmentStream, Distorted.GLSL_VERSION, Distorted.GLSL_VERSION, Distorted.GLSL);
|
|
183 | 183 |
} |
184 | 184 |
catch(Exception e) |
185 | 185 |
{ |
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.