Project

General

Profile

« Previous | Next » 

Revision e8b6aa95

Added by Leszek Koltunski over 7 years ago

Major change in API: separate the GRID from DistortedObject; completely remove classes derived from DistortedObject.

View differences:

src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
29 29
import android.opengl.GLES20;
30 30
import android.opengl.GLSurfaceView;
31 31

  
32
import org.distorted.library.DistortedBitmap;
32
import org.distorted.library.DistortedObject;
33
import org.distorted.library.DistortedBitmapGrid;
33 34
import org.distorted.library.Distorted;
34 35

  
35 36
///////////////////////////////////////////////////////////////////////////////////////////////////
......
42 43
   private Paint mPaint;
43 44
   private int texW, texH;
44 45

  
45
   static DistortedBitmap mBackground;
46
   private DistortedBitmapGrid mGrid;
47

  
48
   static DistortedObject mBackground;
46 49

  
47 50
///////////////////////////////////////////////////////////////////////////////////////////////////
48 51

  
......
102 105
     texW = width;
103 106
     texH = height;
104 107

  
105
     mBackground = new DistortedBitmap(texW,texH, 80);
108
     mGrid = new DistortedBitmapGrid(80,80*height/width);
109
     mBackground = new DistortedObject(texW,texH,1);
106 110
     mBitmap = Bitmap.createBitmap(texW,texH, Bitmap.Config.ARGB_8888);
107 111
     mCanvas = new Canvas(mBitmap);
108 112

  
......
122 126
       {
123 127
       drawBackground();   
124 128
       mView.drawCurve(mCanvas,time);
125
       mBackground.setBitmap(mBitmap);  
129
       mBackground.setTexture(mBitmap);
126 130
       }
127 131
      
128
     mBackground.draw(time);
132
     mBackground.draw(time,mGrid);
129 133
     }
130 134

  
131 135
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff