Project

General

Profile

« Previous | Next » 

Revision a4d59c0b

Added by Leszek Koltunski over 5 years ago

Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).

View differences:

src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
69 69
      Dynamic3D dDistort = new Dynamic3D(3000,0.0f);
70 70
      dDistort.add(new Static3D( 25,0,0));
71 71
      dDistort.add(new Static3D(-25,0,0));
72
      Static3D mPoint = new Static3D(305, 380, 0);
72
      Static3D mPoint = new Static3D(305, 220, 0);
73 73

  
74 74
      mEffects = new DistortedEffects[NUM];
75 75
      mEffects[0] = new DistortedEffects();
......
78 78

  
79 79
      // Add the effects only to the first queue - all VERTEX and FRAGMENT effects are shared!
80 80
      // (Matrix effect cannot be shared as we have to display each Texture in a different location)
81
      VertexEffectSink sink = new VertexEffectSink(new Static1D(8), mPoint, new Static4D(0,0,80,80));
81
      VertexEffectSink sink = new VertexEffectSink(new Static1D(8), mPoint, new Static4D(0,0,0,80));
82 82
      VertexEffectDistort distort = new VertexEffectDistort(dDistort,mPoint);
83 83
      mEffects[0].apply(sink);    // enlarge the nose
84 84
      mEffects[0].apply(distort); // keep moving the whole bitmap left and right.
......
106 106
   private Bitmap readBitmap(int id)
107 107
     {
108 108
     InputStream is = mView.getContext().getResources().openRawResource(id);
109
     Bitmap bitmap=null;
109
     Bitmap bitmap;
110 110
           
111 111
     try 
112 112
       {

Also available in: Unified diff