Project

General

Profile

« Previous | Next » 

Revision 05403bba

Added by Leszek Koltunski over 7 years ago

rename all the 'grid' variables to 'mesh'.

View differences:

src/main/java/org/distorted/library/DistortedFramebuffer.java
261 261

  
262 262
///////////////////////////////////////////////////////////////////////////////////////////////////
263 263
/**
264
 * Draw the (texture,grid,effects) object to the Framebuffer.
264
 * Draw the (texture,mesh,effects) object to the Framebuffer.
265 265
 * <p>
266 266
 * Must be called from a thread holding OpenGL Context.
267 267
 *
268 268
 * @param tex input Texture to use.
269
 * @param grid Class descendant from MeshObject
269
 * @param mesh Class descendant from MeshObject
270 270
 * @param effects The DistortedEffects to use when rendering
271 271
 * @param time Current time, in milliseconds.
272 272
 */
273
  public void renderTo(DistortedTexture tex, MeshObject grid, DistortedEffects effects, long time)
273
  public void renderTo(DistortedTexture tex, MeshObject mesh, DistortedEffects effects, long time)
274 274
    {
275 275
    tex.createTexture();
276 276
    tex.setAsInput();
277 277
    createFBO();
278 278
    GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboIds[0]);
279
    effects.drawPriv(tex.mHalfX, tex.mHalfY, grid, this, time);
279
    effects.drawPriv(tex.mHalfX, tex.mHalfY, mesh, this, time);
280 280
    DistortedFramebuffer.deleteAllMarked();
281 281
    DistortedTexture.deleteAllMarked();
282 282
    }
283 283

  
284 284
///////////////////////////////////////////////////////////////////////////////////////////////////
285 285
/**
286
 * Draw the (framebuffer,grid,effects) object to the Framebuffer.
286
 * Draw the (framebuffer,mesh,effects) object to the Framebuffer.
287 287
 * <p>
288 288
 * Must be called from a thread holding OpenGL Context.
289 289
 *
290 290
 * @param fbo The Framebuffer (previously created with the first constructor, drawing FROM the screen
291 291
 *            is unsupported!) whose COLOR attachment 0 will be used as input texture.
292 292
 *            Please note that rendering from an FBO to itself is unsupported by OpenGL!
293
 * @param grid Class descendant from MeshObject
293
 * @param mesh Class descendant from MeshObject
294 294
 * @param effects The DistortedEffects to use when rendering
295 295
 * @param time Current time, in milliseconds.
296 296
 */
297
  public void renderTo(DistortedFramebuffer fbo, MeshObject grid, DistortedEffects effects, long time)
297
  public void renderTo(DistortedFramebuffer fbo, MeshObject mesh, DistortedEffects effects, long time)
298 298
    {
299 299
    fbo.createFBO();
300 300

  
......
303 303
      createFBO();
304 304
      GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fboIds[0]);
305 305
      GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, fbo.texIds[0]);
306
      effects.drawPriv(fbo.mWidth/2, fbo.mHeight/2, grid, this, time);
306
      effects.drawPriv(fbo.mWidth/2, fbo.mHeight/2, mesh, this, time);
307 307
      DistortedFramebuffer.deleteAllMarked();
308 308
      DistortedTexture.deleteAllMarked();
309 309
      }

Also available in: Unified diff