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/objecttree/ObjectTreeRenderer.java
78 78
      chromaDyn.add(new Static1D(0.0f));
79 79
      chromaDyn.add(new Static1D(0.8f));
80 80

  
81
      mEffects= new DistortedEffects(1);
81
      mEffects= new DistortedEffects();
82 82
      mEffects.apply(new MatrixEffectScale(mScale));
83 83
      mEffects.apply(new MatrixEffectMove(mMove));
84 84
      mEffects.apply(new FragmentEffectChroma(chromaDyn, new Static3D(0,0,1)));
......
181 181
      int gridHeight= bitmap2.getHeight();
182 182
      int gridDepth = gridWidth/GRID;
183 183

  
184
      mEffects.setStretch(lisaWidth,lisaHeight,0);
185

  
186 184
      if( mLisaTexture==null ) mLisaTexture = new DistortedTexture();
187 185
      if( mGridTexture==null ) mGridTexture = new DistortedTexture();
188 186
      mLisaTexture.setTexture(bitmap1);
189 187
      mGridTexture.setTexture(bitmap2);
190 188

  
191
      DistortedEffects gridEffects = new DistortedEffects(gridWidth,gridHeight,gridDepth);
189
      DistortedEffects gridEffects = new DistortedEffects();
190

  
191
      if( mMeshRectangles ==null )
192
        {
193
        mMeshRectangles = new MeshRectangles(1,1);
194
        mMeshRectangles.setStretch(lisaWidth,lisaHeight,0);
195
        }
192 196

  
193
      if( mMeshRectangles ==null ) mMeshRectangles = new MeshRectangles(1,1);
194
      if( mMeshCubes==null) mMeshCubes= new MeshCubes(GRID,GRID,1, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
197
      if( mMeshCubes==null)
198
        {
199
        mMeshCubes= new MeshCubes(GRID,GRID,1, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
200
        mMeshCubes.setStretch(gridWidth,gridHeight,gridDepth);
201
        }
195 202

  
196 203
      mRoot = new DistortedNode(mLisaTexture, mEffects, mMeshRectangles);
197 204
      mRoot.attach(mGridTexture,gridEffects,mMeshCubes);

Also available in: Unified diff