Project

General

Profile

« Previous | Next » 

Revision 7594a5d2

Added by Leszek Koltunski almost 5 years ago

Fix for MeshBase.apply()

View differences:

src/main/java/org/distorted/library/mesh/MeshBase.java
338 338
         }
339 339
       }
340 340

  
341
     for(int index=0; index<mNumVertices; index+=VERT_ATTRIBS )
341
     for(int index=0; index<mNumVertices*VERT_ATTRIBS; index+=VERT_ATTRIBS )
342 342
       {
343 343
       for(int mat=0; mat<numEffects; mat++)
344 344
         {
......
352 352
         mVertAttribs[index+POS_ATTRIB+1] = tmp[1]*x + tmp[5]*y + tmp[ 9]*z + tmp[13];
353 353
         mVertAttribs[index+POS_ATTRIB+2] = tmp[2]*x + tmp[6]*y + tmp[10]*z + tmp[14];
354 354

  
355
//android.util.Log.e("mesh", "vert BEFORE: ("+x+","+y+","+z+")");
356
//android.util.Log.e("mesh", "vert AFTER: ("+mVertAttribs[index+POS_ATTRIB  ]+","+mVertAttribs[index+POS_ATTRIB+1]+","+mVertAttribs[index+POS_ATTRIB+2]+")");
357

  
355 358
         x = mVertAttribs[index+NOR_ATTRIB  ];
356 359
         y = mVertAttribs[index+NOR_ATTRIB+1];
357 360
         z = mVertAttribs[index+NOR_ATTRIB+2];

Also available in: Unified diff