Project

General

Profile

« Previous | Next » 

Revision 4c42bc15

Added by Leszek Koltunski about 4 years ago

Some cleanups in MonaLisa, Bean & Sink.

View differences:

src/main/java/org/distorted/examples/sink/SinkRenderer.java
58 58

  
59 59
  SinkRenderer(GLSurfaceView v)
60 60
    { 
61
    mView = v;
61
    mView    = v;
62
    mTexture = new DistortedTexture();
63
    mEffects = new DistortedEffects();
64
    mScreen  = new DistortedScreen();
62 65

  
63 66
    Dynamic1D sinkStrength = new Dynamic1D(2000,0.0f);
64 67
    sinkStrength.add(new Static1D(1.0f));
65 68
    sinkStrength.add(new Static1D(0.2f));
66 69

  
67
    mEffects = new DistortedEffects();
68

  
69 70
    // strength [changing in time from 1.0 to 0.2 and back],
70 71
    // center   [(0,0,0), i.e. center of the bitmap],
71 72
    // region   [null - apply to the whole bitmap
......
74 75

  
75 76
    mScale = new Static3D(1,1,1);
76 77
    mEffects.apply(new MatrixEffectScale(mScale));
77

  
78
    mScreen = new DistortedScreen();
79 78
    }
80 79

  
81 80
///////////////////////////////////////////////////////////////////////////////////////////////////
......
117 116
      
118 117
    mBmpRatio = (float)bitmap.getHeight()/bitmap.getWidth();
119 118

  
120
    if( mTexture==null ) mTexture = new DistortedTexture();
121 119
    mTexture.setTexture(bitmap);
122 120

  
123 121
    if( mMesh==null ) mMesh = new MeshRectangles(30,(int)(30*mBmpRatio));

Also available in: Unified diff