Project

General

Profile

« Previous | Next » 

Revision 048bc7f4

Added by Leszek Koltunski over 7 years ago

Correct a bug where postprocessed objects would not re-appear after the app went briefly to the background.

View differences:

src/main/java/org/distorted/library/Distorted.java
34 34
  static int GLSL;
35 35
  static String GLSL_VERSION;
36 36

  
37
  static int mMargin = 0;
38

  
39 37
  /**
40 38
   * When creating an instance of a DistortedTexture from another instance, clone the Bitmap that's
41 39
   * backing up our DistortedTexture.
......
153 151

  
154 152
    mInitialized = false;
155 153
    }
156

  
157
///////////////////////////////////////////////////////////////////////////////////////////////////
158

  
159
  public static void setMargin(int pixels)
160
    {
161
    mMargin = pixels;
162
    }
163 154
  }
src/main/java/org/distorted/library/EffectQueuePostprocess.java
333 333
      GLES30.glClearStencil(0);
334 334

  
335 335
      buffer1.setAsOutput();
336
      GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT|GLES30.GL_DEPTH_BUFFER_BIT);//|GLES30.GL_STENCIL_BUFFER_BIT);
336
      GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT|GLES30.GL_DEPTH_BUFFER_BIT|GLES30.GL_STENCIL_BUFFER_BIT);
337 337
      buffer2.setAsOutput();
338
      GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT);
338
      GLES30.glClear(GLES30.GL_COLOR_BUFFER_BIT|GLES30.GL_DEPTH_BUFFER_BIT);
339 339
      }
340 340

  
341 341
    return mNumEffects;

Also available in: Unified diff