Revision 421c2728
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/Distorted.java | ||
---|---|---|
74 | 74 |
*/ |
75 | 75 |
public static final int CLONE_FRAGMENT= 0x8; |
76 | 76 |
/** |
77 |
* When creating an instance of a DistortedObjectTree from another instance, clone the children Nodes.
|
|
77 |
* When creating an instance of a DistortedTree from another instance, clone the children Nodes. |
|
78 | 78 |
* <p> |
79 | 79 |
* This is mainly useful for creating many similar sub-trees of Bitmaps and rendering then at different places |
80 | 80 |
* on the screen, with (optionally) different effects of the top-level root Bitmap. |
... | ... | |
274 | 274 |
return readTextFileFromRawResource( c, R.raw.main_fragment_shader); |
275 | 275 |
} |
276 | 276 |
|
277 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
278 |
|
|
279 |
static boolean isInitialized() |
|
280 |
{ |
|
281 |
return mInitialized; |
|
282 |
} |
|
283 |
|
|
277 | 284 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
278 | 285 |
/** |
279 | 286 |
* When OpenGL context gets created, you need to call this method so that the library can initialise its internal data structures. |
... | ... | |
328 | 335 |
GLES20.glEnableVertexAttribArray(mNormalH); |
329 | 336 |
GLES20.glEnableVertexAttribArray(mTextureCoordH); |
330 | 337 |
|
331 |
DistortedObjectTree.reset();
|
|
338 |
DistortedTree.reset(); |
|
332 | 339 |
EffectMessageSender.startSending(); |
333 | 340 |
} |
334 | 341 |
|
... | ... | |
341 | 348 |
{ |
342 | 349 |
DistortedTexture.onDestroy(); |
343 | 350 |
DistortedFramebuffer.onDestroy(); |
344 |
DistortedObjectTree.onDestroy();
|
|
351 |
DistortedTree.onDestroy(); |
|
345 | 352 |
EffectQueue.onDestroy(); |
346 |
DistortedEffectQueues.onDestroy();
|
|
353 |
DistortedEffects.onDestroy(); |
|
347 | 354 |
EffectMessageSender.stopSending(); |
348 | 355 |
|
349 | 356 |
mInitialized = false; |
350 | 357 |
} |
351 |
|
|
352 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
353 |
/** |
|
354 |
* Returns the true if onSurfaceCreated has been called already, and thus if the Library's is ready |
|
355 |
* to accept effect requests. |
|
356 |
* |
|
357 |
* @return <code>true</code> if the Library is ready for action, <code>false</code> otherwise. |
|
358 |
*/ |
|
359 |
public static boolean isInitialized() |
|
360 |
{ |
|
361 |
return mInitialized; |
|
362 |
} |
|
363 | 358 |
|
364 | 359 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
365 | 360 |
/** |
Also available in: Unified diff
Change of names.