Project

General

Profile

« Previous | Next » 

Revision 23b733db

Added by Leszek Koltunski about 4 years ago

Further corrections.

View differences:

src/main/java/org/distorted/library/main/DistortedLibrary.java
441 441
    GLES31.glUniform1ui(DistortedLibrary.mMainOITNumRecordsH, (int)(DistortedLibrary.mBufferSize*surface.mWidth*surface.mHeight) );
442 442
    mesh.bindVertexAttribs(DistortedLibrary.mMainOITProgram);
443 443

  
444
    float halfX       = mesh.getBoundingX();
445
    float halfY       = mesh.getBoundingY();
446
    float halfZ       = mesh.getBoundingZ();
447 444
    float inflate     = mesh.getInflate();
448 445
    float distance    = surface.mDistance;
449 446
    float mipmap      = surface.mMipmap;
450 447
    float[] projection= surface.mProjectionMatrix;
451 448

  
452
    EffectQueue.send(queues, distance, mipmap, projection, inflate, halfX, halfY, halfZ, 1 );
449
    EffectQueue.send(queues, distance, mipmap, projection, inflate, mesh, 1 );
453 450
    GLES31.glDrawArrays(GLES31.GL_TRIANGLE_STRIP, 0, mesh.getNumVertices() );
454 451

  
455 452
    if( mesh.getShowNormals() )
456 453
      {
457 454
      DistortedLibrary.mMainProgram.useProgram();
458
      EffectQueue.send(queues, distance, mipmap, projection, inflate, halfX, halfY, halfZ, 0 );
455
      EffectQueue.send(queues, distance, mipmap, projection, inflate, mesh, 0 );
459 456
      displayNormals(queues,mesh);
460 457
      }
461 458
    }
......
473 470
    GLES31.glUniform1i(DistortedLibrary.mMainTextureH, 0);
474 471
    mesh.bindVertexAttribs(DistortedLibrary.mMainProgram);
475 472

  
476
    float halfX       = mesh.getBoundingX();
477
    float halfY       = mesh.getBoundingY();
478
    float halfZ       = mesh.getBoundingZ();
479 473
    float inflate     = mesh.getInflate();
480 474
    float distance    = surface.mDistance;
481 475
    float mipmap      = surface.mMipmap;
482 476
    float[] projection= surface.mProjectionMatrix;
483 477

  
484
    EffectQueue.send(queues, distance, mipmap, projection, inflate, halfX, halfY, halfZ, 0 );
478
    EffectQueue.send(queues, distance, mipmap, projection, inflate, mesh, 0 );
485 479
    GLES31.glDrawArrays(GLES31.GL_TRIANGLE_STRIP, 0, mesh.getNumVertices() );
486 480

  
487 481
    if( mesh.getShowNormals() ) displayNormals(queues,mesh);

Also available in: Unified diff