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/check/CheckRenderer.java
79 79

  
80 80
      DistortedEffects.setMax(EffectType.VERTEX  ,act.getMaxV());
81 81
      DistortedEffects.setMax(EffectType.FRAGMENT,act.getMaxF());
82

  
82 83
      VertexEffectSwirl.enable();
83 84
      VertexEffectDeform.enable();
84 85
      FragmentEffectChroma.enable();
......
217 218
        compilationResult += "\nGL vendor: "+(ver==null ? "null" : ver);
218 219
        ver = GLES31.glGetString(GLES31.GL_RENDERER);
219 220
        compilationResult += "\nGL renderer: "+(ver==null ? "null" : ver);
220
      
221

  
221 222
        CheckActivity act = (CheckActivity)mView.getContext();
222
      
223

  
223 224
        act.runOnUiThread(new Runnable() 
224 225
          {
225 226
          public void run() 

Also available in: Unified diff