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/differentbitmaps/DifferentBitmapsRenderer.java
72 72
      Static3D mPoint = new Static3D(305, 220, 0);
73 73

  
74 74
      mEffects = new DistortedEffects[NUM];
75
      mEffects[0] = new DistortedEffects(1);
75
      mEffects[0] = new DistortedEffects();
76 76
      for(int i=1; i<NUM; i++)
77 77
        mEffects[i] = new DistortedEffects(mEffects[0], DistortedLibrary.CLONE_VERTEX| DistortedLibrary.CLONE_FRAGMENT);
78 78

  
......
174 174
     bmpHeight = bitmap0.getHeight();
175 175
     bmpWidth  = bitmap0.getWidth();
176 176

  
177
     mEffects[0].setStretch(bmpWidth,bmpHeight,0);
178

  
179 177
     if( mTexture==null )
180 178
       {
181 179
       mTexture = new DistortedTexture[NUM];
......
188 186
     mTexture[1].setTexture(bitmap1);
189 187
     mTexture[2].setTexture(bitmap2);
190 188

  
191
     if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
189
     if( mMesh==null )
190
       {
191
       mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
192
       mMesh.setStretch(bmpWidth,bmpHeight,0);
193
       }
192 194

  
193 195
     mScreen.detachAll();
194 196
     for(int i=NUM-1; i>=0; i--) mScreen.attach(mTexture[i], mEffects[i], mMesh);

Also available in: Unified diff