Revision d1e740c5
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedObject.java | ||
---|---|---|
320 | 320 |
/** |
321 | 321 |
* Draw the DistortedObject to the location specified by current Matrix effects. |
322 | 322 |
* |
323 |
* @param currTime current time, in milliseconds, as returned by System.currentTimeMillis().
|
|
323 |
* @param currTime current time, in milliseconds. |
|
324 | 324 |
* This gets passed on to Dynamics inside the Effects that are currently applied to the |
325 | 325 |
* Object. |
326 | 326 |
*/ |
327 | 327 |
public void draw(long currTime) |
328 | 328 |
{ |
329 | 329 |
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0); |
330 |
|
|
331 | 330 |
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureDataH[0]); |
332 |
|
|
333 | 331 |
drawPriv(currTime, Distorted.mFramebuffer); |
334 | 332 |
} |
335 |
|
|
333 |
|
|
334 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
335 |
/** |
|
336 |
* Draw the DistortedObject to the Framebuffer passed. |
|
337 |
* |
|
338 |
* @param currTime Current time, in milliseconds. |
|
339 |
* @param df Framebuffer to render this to. |
|
340 |
*/ |
|
341 |
public void draw(long currTime, DistortedFramebuffer df) |
|
342 |
{ |
|
343 |
df.setAsOutput(); |
|
344 |
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureDataH[0]); |
|
345 |
drawPriv(currTime,df); |
|
346 |
} |
|
347 |
|
|
336 | 348 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
337 | 349 |
/** |
338 | 350 |
* Releases all resources. |
... | ... | |
545 | 557 |
/** |
546 | 558 |
* Scales the Object by (possibly changing in time) 3D scale factors. |
547 | 559 |
* |
548 |
* @param scale 3-dimensional Dynamic which at any given time returns a Static3D
|
|
560 |
* @param scale 3-dimensional Data which at any given time returns a Static3D
|
|
549 | 561 |
* representing the current x- , y- and z- scale factors. |
550 | 562 |
* @return ID of the effect added, or -1 if we failed to add one. |
551 | 563 |
*/ |
Also available in: Unified diff
Move the 'Save' app to using a DistortedFramebuffer.