Project

General

Profile

« Previous | Next » 

Revision f44ea591

Added by Leszek Koltunski over 7 years ago

Debugging

View differences:

src/main/java/org/distorted/library/DistortedEffects.java
86 86

  
87 87
  private boolean matrixCloned, vertexCloned, fragmentCloned, postprocessCloned;
88 88

  
89
private int mL, mR, mT, mB;
90

  
89 91
///////////////////////////////////////////////////////////////////////////////////////////////////
90 92

  
91 93
  static void createProgram(Resources resources)
......
191 193
    int maxy = Integer.MIN_VALUE;
192 194
    int wx,wy;
193 195

  
196
int l=-1,r=-1,t=-1,b=-1;
197

  
194 198
    float x,y,z, X,Y,W, ndcX,ndcY;
195 199

  
196 200
    for(int i=0; i<len; i++)
......
209 213
      wx = (int)(df.mWidth *(ndcX+1)/2);
210 214
      wy = (int)(df.mHeight*(ndcY+1)/2);
211 215

  
212
      if( wx<minx ) minx = wx;
213
      if( wx>maxx ) maxx = wx;
214
      if( wy<miny ) miny = wy;
215
      if( wy>maxy ) maxy = wy;
216
      if( wx<minx ) { minx = wx; l = i; }
217
      if( wx>maxx ) { maxx = wx; r = i; }
218
      if( wy<miny ) { miny = wy; t = i; }
219
      if( wy>maxy ) { maxy = wy; b = i; }
216 220
      }
217 221

  
218 222
    mDebugProgram.useProgram();
......
232 236

  
233 237
    GLES20.glVertexAttribPointer(mDebugProgram.mAttribute[0], 2, GLES20.GL_FLOAT, false, 0, mQuadPositions);
234 238
    GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);
239

  
240
    if( l!=mL )
241
      {
242
      mL = l;
243
      android.util.Log.e("effects", "l="+l+" ("+vertices[3*l]+","+vertices[3*l+1]+","+vertices[3*l+2]+")");
244
      }
235 245
    }
236 246

  
237 247
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff