Project

General

Profile

« Previous | Next » 

Revision c90f5dbb

Added by Leszek Koltunski over 7 years ago

Improve Olimpic part 2 (still buggy!)

View differences:

src/main/java/org/distorted/examples/olimpic/OlimpicActivity.java
199 199

  
200 200
      for(int i=0; i<num; i++)
201 201
        {
202
        renderer.pressed(0, i, mBlue[i]  );
203
        renderer.pressed(1, i, mBlack[i] );
204
        renderer.pressed(2, i, mRed[i]   );
205
        renderer.pressed(3, i, mYellow[i]);
206
        renderer.pressed(4, i, mGreen[i] );
202
        if( !mBlue[i]   ) renderer.pressed(0, i, false );
203
        if( !mBlack[i]  ) renderer.pressed(1, i, false );
204
        if( !mRed[i]    ) renderer.pressed(2, i, false );
205
        if( !mYellow[i] ) renderer.pressed(3, i, false );
206
        if( !mGreen[i]  ) renderer.pressed(4, i, false );
207 207
        }
208 208
      }
209 209

  
src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
41 41

  
42 42
import android.graphics.Bitmap;
43 43
import android.graphics.BitmapFactory;
44
import android.opengl.GLES30;
45 44
import android.opengl.GLSurfaceView;
46 45

  
47 46
///////////////////////////////////////////////////////////////////////////////////////////////////
......
71 70
       {
72 71
       if( number==0 )
73 72
         {
73
         android.util.Log.e("renderer", "pressed: root "+checked);
74

  
74 75
         if( checked ) mRoot.attach(mCircleNode[color]);
75 76
         else          mRoot.detach(mCircleNode[color]);
76 77
         }
77 78
       else if( number>0 && number<=NUM_LEAVES )
78 79
         {
80
         android.util.Log.e("renderer", "pressed: circle: "+color+" leaf: "+number+" :"+checked);
81

  
79 82
         if( checked ) mCircleNode[color].attach( mLeaf, mEffects[number-1], mMesh);
80 83
         else          mCircleNode[color].detach(mEffects[number-1]);
81 84
         }

Also available in: Unified diff