Project

General

Profile

« Previous | Next » 

Revision 13155c68

Added by Leszek Koltunski over 7 years ago

Improve the Sink app (funny?)

View differences:

src/main/java/org/distorted/examples/sink/SinkRenderer.java
59 59
  SinkRenderer(GLSurfaceView v)
60 60
    { 
61 61
    mView = v;
62
      
63
    Static3D pLeft = new Static3D(214, 206, 0);
64
    Static3D pRight= new Static3D(390, 212, 0);
65
    Static4D Region= new Static4D(0,0,60,60);
66 62

  
67
    Dynamic1D dSink = new Dynamic1D(2000,0.0f);
68
    dSink.add(new Static1D( 1));
69
    dSink.add(new Static1D(10));
63
    Dynamic1D sink = new Dynamic1D(2000,0.0f);
64
    sink.add(new Static1D(1.0f));
65
    sink.add(new Static1D(0.2f));
70 66

  
71 67
    mEffects = new DistortedEffects();
72
    mEffects.sink( dSink, pLeft, Region);
73
    mEffects.sink( dSink, pRight,Region);
68
    mEffects.sink( sink, new Static3D(297, 320, 0), null);
74 69

  
75 70
    mScreen = new DistortedFramebuffer(0);
76 71
    }
......
115 110
    {
116 111
    GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
117 112

  
118
    InputStream is = mView.getContext().getResources().openRawResource(R.raw.dog);
113
    InputStream is = mView.getContext().getResources().openRawResource(R.raw.cat);
119 114
    Bitmap bitmap;
120 115
        
121 116
    try 

Also available in: Unified diff