Project

General

Profile

« Previous | Next » 

Revision 9e999930

Added by Leszek Koltunski almost 6 years ago

Start merging master and OIT.

View differences:

src/main/java/org/distorted/library/main/DistortedOutputSurface.java
354 354

  
355 355
            numRenders += lastQueue.postprocess(mBuffer,fbo);
356 356
            numRenders += blitWithDepth(time, mBuffer[quality],fbo);
357
            mBuffer[quality].clearBuffer(time,fbo);
357
            mBuffer[quality].clearBuffer(fbo);
358 358
            }
359 359

  
360 360
          internalQuality = currQueue.getInternalQuality();
......
417 417

  
418 418
///////////////////////////////////////////////////////////////////////////////////////////////////
419 419

  
420
  private void clearBuffer(long time,int fbo)
420
  private void clearBuffer(int fbo)
421 421
    {
422
    GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, mFBOH[fbo]);
423

  
424
    mTime[fbo] = time;    // have to do this otherwise on the next setAsOutput() we would clear
425 422
    DistortedRenderState.colorDepthStencilOn();
423

  
426 424
    GLES31.glClearColor(mClearR, mClearG, mClearB, mClearA);
425
    GLES31.glClearDepthf(mClearDepth);
426
    GLES31.glClearStencil(mClearStencil);
427

  
428
    GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, mFBOH[fbo]);
429
    GLES31.glFramebufferTexture2D(GLES31.GL_FRAMEBUFFER, GLES31.GL_COLOR_ATTACHMENT0, GLES31.GL_TEXTURE_2D, mColorH[2*fbo+1], 0);
430
    GLES31.glClear(GLES31.GL_COLOR_BUFFER_BIT|GLES31.GL_DEPTH_BUFFER_BIT|GLES31.GL_STENCIL_BUFFER_BIT);
431
    GLES31.glFramebufferTexture2D(GLES31.GL_FRAMEBUFFER, GLES31.GL_COLOR_ATTACHMENT0, GLES31.GL_TEXTURE_2D, mColorH[2*fbo  ], 0);
427 432
    GLES31.glClear(GLES31.GL_COLOR_BUFFER_BIT);
433

  
428 434
    DistortedRenderState.colorDepthStencilRestore();
429 435
    }
430 436

  

Also available in: Unified diff