Project

General

Profile

« Previous | Next » 

Revision 84d51487

Added by Leszek Koltunski over 5 years ago

Cut one interdependency between the EffectQueuePreprocess and DistortedEffects

View differences:

src/main/java/org/distorted/library/main/DistortedEffects.java
403 403
      postprocessCloned = false;
404 404
      }
405 405
    }
406
///////////////////////////////////////////////////////////////////////////////////////////////////
407

  
408
  EffectQueueMatrix getMatrix()
409
    {
410
    return mM;
411
    }
412

  
413
///////////////////////////////////////////////////////////////////////////////////////////////////
414

  
415
  EffectQueueVertex getVertex()
416
    {
417
    return mV;
418
    }
419

  
420
///////////////////////////////////////////////////////////////////////////////////////////////////
421

  
422
  EffectQueueFragment getFragment()
423
    {
424
    return mF;
425
    }
406 426

  
407 427
///////////////////////////////////////////////////////////////////////////////////////////////////
408 428

  
......
447 467
    GLES31.glDrawArrays(GLES31.GL_LINES, 0, 2*num);
448 468
    }
449 469

  
450
///////////////////////////////////////////////////////////////////////////////////////////////////
451

  
452
  void send(float halfX, float halfY, float halfZ, float marginInPixels, DistortedOutputSurface surface, int variant)
453
    {
454
    float inflate=0.0f;
455

  
456
    mM.send(surface,halfX,halfY,halfZ,variant);
457

  
458
    if( marginInPixels!=0.0f )
459
      {
460
      inflate = mM.magnify(surface,halfX,halfY,halfZ,marginInPixels);
461
      }
462

  
463
    mV.send(inflate,variant);
464
    }
465

  
466 470
///////////////////////////////////////////////////////////////////////////////////////////////////
467 471

  
468 472
  void drawPrivOIT(float halfW, float halfH, MeshBase mesh, DistortedOutputSurface surface, long currTime)
src/main/java/org/distorted/library/main/EffectQueuePostprocess.java
170 170

  
171 171
      mesh.bindVertexAttribs(mPreProgram);
172 172

  
173
      node.getEffects().send(halfW, halfH, halfZ, mHalo, buffer, 2);
173
      DistortedEffects effects = node.getEffects();
174
      EffectQueueMatrix matrix = effects.getMatrix();
175
      EffectQueueVertex vertex = effects.getVertex();
176

  
177
      float inflate=0.0f;
178

  
179
      matrix.send(buffer,halfW,halfH,halfZ,2);
180

  
181
      if( mHalo!=0.0f )
182
        {
183
        inflate = matrix.magnify(buffer,halfW,halfH,halfZ,mHalo);
184
        }
185

  
186
      vertex.send(inflate,2);
174 187

  
175 188
      if( mA!=0.0f )
176 189
        {

Also available in: Unified diff