Project

General

Profile

« Previous | Next » 

Revision 4867b578

Added by Leszek Koltunski about 4 years ago

Convert the second app, Flag, to the new MeshBase.setStretch-less API ( use VertexEffectScale instead )

View differences:

src/main/java/org/distorted/examples/flag/FlagRenderer.java
26 26
import org.distorted.examples.R;
27 27
import org.distorted.library.effect.MatrixEffectQuaternion;
28 28
import org.distorted.library.effect.MatrixEffectScale;
29
import org.distorted.library.effect.VertexEffectScale;
29 30
import org.distorted.library.effect.VertexEffectWave;
30 31
import org.distorted.library.main.DistortedLibrary;
31 32
import org.distorted.library.main.DistortedEffects;
......
77 78
      mObjDepth =   5;
78 79

  
79 80
      MeshCubes mesh = new MeshCubes(GRIDX,GRIDY,1, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
80
      mesh.setStretch(mObjWidth,mObjHeight,mObjDepth);
81 81

  
82 82
      mTexture = new DistortedTexture();
83 83

  
......
96 96
      Static4D waveRegion = new Static4D(0,0,0,mObjWidth);
97 97

  
98 98
      DistortedEffects effects = new DistortedEffects();
99
      effects.apply( new VertexEffectScale( new Static3D(mObjWidth,mObjHeight,mObjDepth) ) );
99 100
      effects.apply( new VertexEffectWave(mWaveDyn, waveCenter, waveRegion) );
100 101

  
101 102
      mScale = new Static3D(1,1,1);
......
187 188
      
188 189
      mTexture.setTexture(bitmap);
189 190

  
191
      VertexEffectScale.enable();
190 192
      VertexEffectWave.enable();
191 193

  
192 194
      try

Also available in: Unified diff