Revision 885b9cca
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java | ||
---|---|---|
26 | 26 |
import org.distorted.examples.R; |
27 | 27 |
import org.distorted.library.effect.EffectName; |
28 | 28 |
import org.distorted.library.effect.EffectType; |
29 |
import org.distorted.library.effect.FragmentEffectAlpha; |
|
30 |
import org.distorted.library.effect.FragmentEffectBrightness; |
|
31 |
import org.distorted.library.effect.FragmentEffectChroma; |
|
32 |
import org.distorted.library.effect.FragmentEffectContrast; |
|
33 |
import org.distorted.library.effect.FragmentEffectSaturation; |
|
29 | 34 |
import org.distorted.library.effect.MatrixEffectMove; |
30 | 35 |
import org.distorted.library.effect.MatrixEffectQuaternion; |
31 | 36 |
import org.distorted.library.effect.MatrixEffectScale; |
37 |
import org.distorted.library.effect.VertexEffectDeform; |
|
38 |
import org.distorted.library.effect.VertexEffectDistort; |
|
39 |
import org.distorted.library.effect.VertexEffectPinch; |
|
40 |
import org.distorted.library.effect.VertexEffectSink; |
|
41 |
import org.distorted.library.effect.VertexEffectSwirl; |
|
42 |
import org.distorted.library.effect.VertexEffectWave; |
|
32 | 43 |
import org.distorted.library.main.Distorted; |
33 | 44 |
import org.distorted.library.main.DistortedEffects; |
34 | 45 |
import org.distorted.library.main.DistortedNode; |
... | ... | |
272 | 283 |
mCenterTexture.setTexture(bitmapC); |
273 | 284 |
mRegionTexture.setTexture(bitmapR); |
274 | 285 |
|
275 |
EffectType type; |
|
276 |
|
|
277 |
for( EffectName name : EffectName.values() ) |
|
278 |
{ |
|
279 |
type = name.getType(); |
|
280 |
|
|
281 |
if( type== EffectType.VERTEX || type==EffectType.FRAGMENT ) |
|
282 |
{ |
|
283 |
DistortedEffects.enableEffect(name); |
|
284 |
} |
|
285 |
} |
|
286 |
VertexEffectDeform.enable(); |
|
287 |
VertexEffectDistort.enable(); |
|
288 |
VertexEffectPinch.enable(); |
|
289 |
VertexEffectSink.enable(); |
|
290 |
VertexEffectSwirl.enable(); |
|
291 |
VertexEffectWave.enable(); |
|
292 |
|
|
293 |
FragmentEffectAlpha.enable(); |
|
294 |
FragmentEffectBrightness.enable(); |
|
295 |
FragmentEffectChroma.enable(); |
|
296 |
FragmentEffectContrast.enable(); |
|
297 |
FragmentEffectSaturation.enable(); |
|
286 | 298 |
|
287 | 299 |
try |
288 | 300 |
{ |
Also available in: Unified diff
Move all the knowledge about Vertex and Fragment effects to their respective classes.