Project

General

Profile

« Previous | Next » 

Revision 1dfc9074

Added by Leszek Koltunski almost 7 years ago

All knowledge about Postporcessing moved to the respective Effect classes.

View differences:

src/main/java/org/distorted/library/main/DistortedOutputSurface.java
181 181
      {
182 182
      mBuffer[j] = new DistortedFramebuffer(2,BOTH_DEPTH_STENCIL,TYPE_SYST, (int)(mWidth*mipmap), (int)(mHeight*mipmap) );
183 183
      mBuffer[j].mMipmap = mipmap;
184
      mBuffer[j].mNear   = mNear;  // copy mNear as well (for blitting- see PostprocessEffectBlur.apply() )
184 185
      mipmap *= EffectQuality.MULTIPLIER;
185 186
      }
186 187

  
......
322 323
    return mChildren;
323 324
    }
324 325

  
325
///////////////////////////////////////////////////////////////////////////////////////////////////
326

  
327
  void setAsOutput()
328
    {
329
    GLES30.glBindFramebuffer(GLES30.GL_FRAMEBUFFER, mFBOH[0]);
330
    }
331

  
332 326
///////////////////////////////////////////////////////////////////////////////////////////////////
333 327
// PUBLIC API
334 328
///////////////////////////////////////////////////////////////////////////////////////////////////
......
431 425
      }
432 426
    }
433 427

  
428
///////////////////////////////////////////////////////////////////////////////////////////////////
429
/**
430
 * Bind this Surface as a Framebuffer we can render to.
431
 * <p>
432
 * This version does not attempt to clear anything.
433
 */
434

  
435
  public void setAsOutput()
436
    {
437
    GLES30.glBindFramebuffer(GLES30.GL_FRAMEBUFFER, mFBOH[0]);
438
    }
439

  
440
///////////////////////////////////////////////////////////////////////////////////////////////////
441
/**
442
 * Return the Near plane of the Projection included in the Surface.
443
 *
444
 * @return the Near plane.
445
 */
446
  public float getNear()
447
    {
448
    return mNear;
449
    }
450

  
434 451
///////////////////////////////////////////////////////////////////////////////////////////////////
435 452
/**
436 453
 * Set mipmap level.
......
542 559
      mNear=0.99f;
543 560
      }
544 561

  
562
    if( mBuffer[0]!=null )
563
      {
564
      for(int j=0; j<EffectQuality.LENGTH; j++) mBuffer[j].mNear = mNear;
565
      }
566

  
545 567
    createProjection();
546 568
    }
547 569

  

Also available in: Unified diff