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/DistortedFramebuffer.java
225 225
    return false;
226 226
    }
227 227

  
228
///////////////////////////////////////////////////////////////////////////////////////////////////
229
/**
230
 * Bind the underlying rectangle of pixels as a OpenGL Texture.
231
 *
232
 * @return <code>true</code> if successful.
233
 */
234
  public boolean setAsInput(int texture)
235
    {
236
    if( texture>=0 && texture<mNumColors && mColorH[texture]>0 )
237
      {
238
      GLES30.glActiveTexture(GLES30.GL_TEXTURE0);
239
      GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mColorH[texture]);
240
      return true;
241
      }
242

  
243
    return false;
244
    }
245

  
246
///////////////////////////////////////////////////////////////////////////////////////////////////
247

  
248
  public void bindForOutput(int texture)
249
    {
250
    if( texture>=0 && texture<mNumColors && mColorH[texture]>0 )
251
      {
252
      GLES30.glFramebufferTexture2D(GLES30.GL_FRAMEBUFFER, GLES30.GL_COLOR_ATTACHMENT0, GLES30.GL_TEXTURE_2D, mColorH[texture], 0);
253
      }
254
    }
255

  
228 256
///////////////////////////////////////////////////////////////////////////////////////////////////
229 257
/**
230 258
 * Enable.disable DEPTH and STENCIL buffers.

Also available in: Unified diff