Revision 85cbbc5e
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/EffectQueuePostprocess.java | ||
---|---|---|
30 | 30 |
import org.distorted.library.program.VertexCompilationException; |
31 | 31 |
import org.distorted.library.program.VertexUniformsException; |
32 | 32 |
import org.distorted.library.type.Data1D; |
33 |
import org.distorted.library.type.Data2D; |
|
34 | 33 |
import org.distorted.library.type.Dynamic1D; |
35 |
import org.distorted.library.type.Dynamic2D; |
|
36 | 34 |
import org.distorted.library.type.Static1D; |
37 |
import org.distorted.library.type.Static2D; |
|
38 | 35 |
|
39 | 36 |
import java.io.InputStream; |
40 | 37 |
import java.nio.ByteBuffer; |
... | ... | |
106 | 103 |
|
107 | 104 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
108 | 105 |
|
109 |
static void getUniforms(int mProgramH) |
|
106 |
private static void getUniforms(int mProgramH)
|
|
110 | 107 |
{ |
111 | 108 |
mNumEffectsH= GLES20.glGetUniformLocation( mProgramH, "pNumEffects"); |
112 | 109 |
mTypeH = GLES20.glGetUniformLocation( mProgramH, "pType"); |
... | ... | |
199 | 196 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
200 | 197 |
// blur |
201 | 198 |
|
202 |
synchronized long add(EffectNames eln, Data1D degree, Data2D center)
|
|
199 |
synchronized long add(EffectNames eln, Data1D degree) |
|
203 | 200 |
{ |
204 | 201 |
if( mMax[INDEX]>mNumEffects ) |
205 | 202 |
{ |
... | ... | |
214 | 211 |
} |
215 | 212 |
else return -1; |
216 | 213 |
|
217 |
if( center instanceof Dynamic2D) |
|
218 |
{ |
|
219 |
mInter[1][mNumEffects] = (Dynamic2D)center; |
|
220 |
} |
|
221 |
else if( center instanceof Static2D) |
|
222 |
{ |
|
223 |
mInter[1][mNumEffects] = null; |
|
224 |
mUniforms[NUM_UNIFORMS*mNumEffects+1] = ((Static2D)center).getX(); |
|
225 |
mUniforms[NUM_UNIFORMS*mNumEffects+2] = ((Static2D)center).getY(); |
|
226 |
} |
|
227 |
else return -1; |
|
214 |
mInter[1][mNumEffects] = null; |
|
215 |
mInter[2][mNumEffects] = null; |
|
228 | 216 |
|
229 | 217 |
return addBase(eln); |
230 | 218 |
} |
Also available in: Unified diff
Postprocessing effects: remove support for Center