Project

General

Profile

« Previous | Next » 

Revision 676c14da

Added by Leszek Koltunski over 5 years ago

Relax requirements on when we can call DistortedEffects.setMax().

Before this change one had to call it before creation of shaders and before any of the DistortedEffects classes got created.
This commit removes the second requirement so now with setMax it's just like with enabling effects: it's best done in onSurfaceCreated.

View differences:

src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
306 306
      mCenterTexture.setTexture(bitmapC);
307 307
      mRegionTexture.setTexture(bitmapR);
308 308

  
309
      DistortedEffects.setMax(EffectType.VERTEX  ,10);
310
      DistortedEffects.setMax(EffectType.FRAGMENT,10);
311

  
309 312
      Effect.enableEffects(EffectType.VERTEX);
310 313
      Effect.enableEffects(EffectType.FRAGMENT);
311 314
      Effect.enableEffects(EffectType.POSTPROCESS);

Also available in: Unified diff