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/projection/ProjectionRenderer.java
56 56
   ProjectionRenderer(GLSurfaceView view)
57 57
      { 
58 58
      mView   = view;
59
      mEffects= new DistortedEffects(1);
59
      mEffects= new DistortedEffects();
60 60
      mScreen = new DistortedScreen();
61 61

  
62 62
      mVector = new Static3D(0,0,0);
......
130 130
      mPoint3.set(  width/4, 3*height/4, 0);
131 131
      mPoint4.set(3*width/4, 3*height/4, 0);
132 132

  
133
      mEffects.setStretch(width,height,0);
134

  
135 133
      // Avoid memory leaks: delete old texture if it exists (it might if we
136 134
      // got here after a brief amount of time spent in the background)
137 135
      if( mTexture!=null ) mTexture.markForDeletion();
......
140 138
      mTexture.setTexture(bmp);
141 139

  
142 140
      // likewise with the Mesh
143
      if( mMesh!=null ) mMesh.markForDeletion();
144

  
141
      if( mMesh!=null )  mMesh.markForDeletion();
145 142
      mMesh = new MeshRectangles(100,100*height/width);
143
      mMesh.setStretch(width,height,0);
146 144

  
147 145
      mScreen.detachAll();
148 146
      mScreen.attach(mTexture,mEffects,mMesh);

Also available in: Unified diff