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/Effects3DActivity2.java
100 100
    mShowNormal = false;
101 101
    mUseOIT     = false;
102 102

  
103
    DistortedEffects.setMax(EffectType.VERTEX  ,10);    // those have to be called before
104
    DistortedEffects.setMax(EffectType.FRAGMENT,10);    // any DistortedEffect get created!
105

  
106 103
    switch(mObjectType)
107 104
      {
108 105
      case 0: mMesh = new MeshCubes(mNumCols, mString, mNumSlic);

Also available in: Unified diff