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/check/CheckRenderer.java
92 92
      mScale  = new Static3D(1,1,1);
93 93
      mCenter = new Static3D(0,0,0);
94 94

  
95
      mEffects = new DistortedEffects(1);
95
      mEffects = new DistortedEffects();
96 96
      mEffects.apply(new MatrixEffectScale(mScale));
97 97
      mEffects.apply(new MatrixEffectMove(mMove));
98 98

  
......
181 181
      mObjHeight = bitmap.getHeight();
182 182
      mObjWidth  = bitmap.getWidth();
183 183

  
184
      mEffects.setStretch(mObjWidth,mObjHeight,0);
185

  
186 184
      if( mTexture==null ) mTexture = new DistortedTexture();
187 185
      mTexture.setTexture(bitmap);
188 186

  
189
      if( mMesh==null ) mMesh = new MeshRectangles(30,30*mObjHeight/mObjWidth);
187
      if( mMesh==null )
188
        {
189
        mMesh = new MeshRectangles(30,30*mObjHeight/mObjWidth);
190
        mMesh.setStretch(mObjWidth,mObjHeight,0);
191
        }
190 192

  
191 193
      mScreen.detachAll();
192 194
      mScreen.attach(mTexture,mEffects,mMesh);

Also available in: Unified diff