Project

General

Profile

« Previous | Next » 

Revision acad428e

Added by Leszek Koltunski over 4 years ago

Reading a mesh from the .dmesh file works now.

View differences:

src/main/java/org/distorted/examples/meshfile/MeshFileActivity.java
38 38
    private String[] mNames = new String[] { "deferredjob",
39 39
                                             "meshjoin"   ,
40 40
                                             "predeform"  ,
41
                                             "singlemesh" ,
42 41
                                             "cube2"      ,
43 42
                                             "cube3"      ,
44 43
                                             "cube4"      ,
......
113 112
        switch(pos)
114 113
          {
115 114
          case  0: mResource = R.raw.deferredjob; break;
116
          //case  1: mResource = R.raw.meshjoin   ; break;
115
          case  1: mResource = R.raw.meshjoin   ; break;
117 116
          case  2: mResource = R.raw.predeform  ; break;
118
          /*
119
          case  3: mResource = R.raw.singlemesh ; break;
120
          case  4: mResource = R.raw.cube2      ; break;
121
          case  5: mResource = R.raw.cube3      ; break;
122
          case  6: mResource = R.raw.cube4      ; break;
123
          case  7: mResource = R.raw.cube5      ; break;
124
          case  8: mResource = R.raw.pyra3      ; break;
125
          case  9: mResource = R.raw.pyra4      ; break;
126
          case 10: mResource = R.raw.pyra5      ; break;
127

  
128
           */
117
          case  3: mResource = R.raw.cube2      ; break;
118
          case  4: mResource = R.raw.cube3      ; break;
119
          case  5: mResource = R.raw.cube4      ; break;
120
          case  6: mResource = R.raw.cube5      ; break;
121
          case  7: mResource = R.raw.pyra3      ; break;
122
          case  8: mResource = R.raw.pyra4      ; break;
123
          case  9: mResource = R.raw.pyra5      ; break;
129 124
          }
130 125
        }
131 126
      }
src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java
124 124

  
125 125
    void open(int resourceID)
126 126
      {
127
      long t1 = System.currentTimeMillis();
127 128
      mMesh = createMesh(resourceID);
129
      long t2 = System.currentTimeMillis();
130

  
131
      android.util.Log.e("file", "time: "+(t2-t1));
128 132

  
129 133
      mScreen.detachAll();
130 134
      mScreen.attach(mTexture,mEffects,mMesh);

Also available in: Unified diff