Project

General

Profile

« Previous | Next » 

Revision 687263cc

Added by Leszek Koltunski about 4 years ago

Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)

View differences:

src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java
68 68

  
69 69
      mView = view;
70 70
      mManager = new AroundTheWorldEffectsManager();
71
      mEffects = new DistortedEffects();
71
      mEffects = new DistortedEffects(1);
72 72
      mEffects.apply(new MatrixEffectScale(mScale));
73 73
      mEffects.apply(new MatrixEffectMove(mMove));
74 74

  
......
136 136
      mObjWidth = bitmap.getWidth();
137 137
      mObjHeight= bitmap.getHeight();
138 138

  
139
      if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight);
139
      mEffects.setStretch(mObjWidth,mObjHeight,0);
140

  
141
      if( mTexture==null ) mTexture = new DistortedTexture();
140 142
      mTexture.setTexture(bitmap);
141 143

  
142 144
      if( mMesh==null ) mMesh = new MeshRectangles(30,30*mObjHeight/mObjWidth);

Also available in: Unified diff