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/plainmonalisa/RenderThread.java
95 95
    dRight.add( new Static3D(  0,  0, 0) );
96 96
    dRight.add( new Static3D( 20, 10, 0) );
97 97

  
98
    mEffects = new DistortedEffects(1);
98
    mEffects = new DistortedEffects();
99 99
    mEffects.apply( new VertexEffectDistort(dLeft , pLeft , rLeft ) );
100 100
    mEffects.apply( new VertexEffectDistort(dRight, pRight, rRight) );
101 101

  
......
262 262
    bmpHeight = bmp.getHeight();
263 263
    bmpWidth  = bmp.getWidth();
264 264

  
265
    mEffects.setStretch(bmpWidth,bmpHeight,0);
266

  
267 265
    if( mTexture==null ) mTexture = new DistortedTexture();
268 266
    mTexture.setTexture(bmp);
269 267

  
270
    if( mMesh==null ) mMesh = new MeshRectangles(9,9*bmpHeight/bmpWidth);
268
    if( mMesh==null )
269
      {
270
      mMesh = new MeshRectangles(9,9*bmpHeight/bmpWidth);
271
      mMesh.setStretch(bmpWidth,bmpHeight,0);
272
      }
271 273

  
272 274
    mScreen.detachAll();
273 275
    mScreen.attach(mTexture,mEffects,mMesh);

Also available in: Unified diff