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

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

  
137
      mTexture= new DistortedTexture(width,height);
139
      mTexture= new DistortedTexture();
138 140
      mTexture.setTexture(bmp);
139 141

  
140 142
      // likewise with the Mesh

Also available in: Unified diff