Project

General

Profile

« Previous | Next » 

Revision a0700272

Added by Leszek Koltunski about 8 years ago

First attempt at the 'Mirror' app.

View differences:

src/main/java/org/distorted/library/DistortedFramebuffer.java
273 273
 * <p>
274 274
 * Must be called from a thread holding OpenGL Context.
275 275
 *
276
 * @param fbo The Framebuffer whose COLOR attachment 0 will be used as input texture.
276
 * @param fbo The Framebuffer (previously created with the first  constructor, drawing FROM the screen
277
 *            is unsupported!) whose COLOR attachment 0 will be used as input texture.
277 278
 *            Please note that rendering from an FBO to itself is unsupported by OpenGL!
278 279
 * @param grid Class descendant from GridObject
279 280
 * @param effects The DistortedEffects to use when rendering
......
283 284
    {
284 285
    fbo.createFBO();
285 286

  
286
    if( fbo.texIds[0]>=0 )    // fbo created with the first constructor
287
    if( fbo.texIds[0]>0 )    // fbo created with the first constructor
287 288
      {
288 289
      createFBO();
289 290
      GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboIds[0]);
......
292 293
      DistortedFramebuffer.deleteAllMarked();
293 294
      DistortedTexture.deleteAllMarked();
294 295
      }
295
    else                      // the second constructor
296
      {
297
      /*
298
      createFBO();
299
      GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboIds[0]);
300
      // ??? TODO
301
      effects.drawPriv(fbo.mWidth/2, fbo.mHeight/2, grid, this, time);
302
      DistortedFramebuffer.deleteAllMarked();
303
      DistortedTexture.deleteAllMarked();
304
      */
305
      }
306 296
    }
307 297

  
308 298
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff