Project

General

Profile

« Previous | Next » 

Revision 698ad0a8

Added by Leszek Koltunski about 4 years ago

Move the Effects.setStretch to Meshbase.setStretch

View differences:

src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java
83 83

  
84 84
      mEffects = new DistortedEffects[NUM];
85 85

  
86
      for(int i=0; i<NUM; i++) mEffects[i] = new DistortedEffects(1);
86
      for(int i=0; i<NUM; i++) mEffects[i] = new DistortedEffects();
87 87

  
88 88
      Dynamic1D sink = new Dynamic1D(2000,0.0f);
89 89
      sink.add(new Static1D( 1));
......
173 173
     bmpHeight = bitmap.getHeight();
174 174
     bmpWidth  = bitmap.getWidth();
175 175

  
176
      for(int i=0; i<NUM; i++)
177
        {
178
        mEffects[i].setStretch(bmpWidth, bmpHeight, 0);
179
        }
176
     if( mMesh==null )
177
       {
178
       mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
179
       mMesh.setStretch(bmpWidth, bmpHeight, 0);
180
       }
180 181

  
181
     if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
182 182
     if( mTexture==null ) mTexture  = new DistortedTexture();
183 183
     mTexture.setTexture(bitmap);
184 184

  

Also available in: Unified diff