Revision da9b3f07
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/library/main/EffectQueuePostprocess.java | ||
---|---|---|
22 | 22 |
import android.content.res.Resources; |
23 | 23 |
import android.opengl.GLES30; |
24 | 24 |
|
25 |
import org.distorted.library.effect.Effect; |
|
25 |
import org.distorted.library.effect.EffectName; |
|
26 |
import org.distorted.library.effect.EffectType; |
|
26 | 27 |
import org.distorted.library.effect.PostprocessEffect; |
27 | 28 |
import org.distorted.library.R; |
28 | 29 |
import org.distorted.library.message.EffectMessage; |
... | ... | |
48 | 49 |
private static final int TEX_DATA_SIZE= 2; // Post Program: size of the texture coordinate data in elements. |
49 | 50 |
|
50 | 51 |
private static final int NUM_UNIFORMS = PostprocessEffect.NUM_UNIFORMS; |
51 |
private static final int INDEX = Effect.POSTPROCESS;
|
|
52 |
private static final int INDEX = EffectType.POSTPROCESS.ordinal();
|
|
52 | 53 |
|
53 | 54 |
private static final FloatBuffer mQuadPositions, mQuadTexture, mQuadTextureInv; |
54 | 55 |
|
... | ... | |
188 | 189 |
for(int j=0; j<mNumListeners; j++) |
189 | 190 |
EffectMessageSender.newMessage( mListeners.elementAt(j), EffectMessage.EFFECT_FINISHED, mEffects[i].getID(), mID); |
190 | 191 |
|
191 |
if( PostprocessEffect.isUnity( mEffects[i].getName(), mUniforms, NUM_UNIFORMS*i) )
|
|
192 |
if( mEffects[i].isUnity( mUniforms, NUM_UNIFORMS*i) )
|
|
192 | 193 |
{ |
193 | 194 |
remove(i--); |
194 | 195 |
continue; |
... | ... | |
268 | 269 |
|
269 | 270 |
for(int i=0; i<mNumEffects; i++) |
270 | 271 |
{ |
271 |
if (mName[i] == PostprocessEffect.BLUR )
|
|
272 |
if (mName[i] == EffectName.BLUR.ordinal() )
|
|
272 | 273 |
{ |
273 | 274 |
blur(NUM_UNIFORMS*i,surface); |
274 | 275 |
numRenders += 2; |
275 | 276 |
} |
276 |
else if (mName[i] == PostprocessEffect.GLOW )
|
|
277 |
else if (mName[i] == EffectName.GLOW.ordinal() )
|
|
277 | 278 |
{ |
278 | 279 |
glow(NUM_UNIFORMS*i,surface); |
279 | 280 |
numRenders += 2; |
Also available in: Unified diff
Progress with support for Effect classes.
The library compiles now!