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/aroundtheworld/AroundTheWorldRenderer.java
63 63

  
64 64
   AroundTheWorldRenderer(GLSurfaceView view)
65 65
      {
66
      DistortedEffects.setMax(EffectType.VERTEX,12);
67
      DistortedEffects.setMax(EffectType.FRAGMENT,9);
68

  
69 66
      mMove = new Static3D(0,0,0);
70 67
      mScale= new Static3D(1,1,1);
71 68

  
......
147 144
      mScreen.detachAll();
148 145
      mScreen.attach(mTexture, mEffects, mMesh);
149 146

  
147
      DistortedEffects.setMax(EffectType.VERTEX  ,12);
148
      DistortedEffects.setMax(EffectType.FRAGMENT, 9);
149

  
150 150
      VertexEffectDistort.enable();
151 151
      VertexEffectSink.enable();
152 152
      VertexEffectPinch.enable();

Also available in: Unified diff