Revision b4cc083b
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java | ||
---|---|---|
144 | 144 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
145 | 145 |
|
146 | 146 |
public void onSurfaceChanged(GL10 glUnused, int width, int height) |
147 |
{ |
|
148 |
Distorted.onSurfaceChanged(width, height); |
|
147 |
{ |
|
148 |
mScreenQueue.abortAllEffects(); |
|
149 |
mGFFAQueue.abortAllEffects(); |
|
150 |
mLogoQueue.abortAllEffects(); |
|
151 |
mCrawlQueue.abortAllEffects(); |
|
152 |
mCrawlBackgroundQueue.abortAllEffects(); |
|
153 |
|
|
154 |
for(int i=0; i<NUM_STARS; i++) mStarQueue[i].abortAllEffects(); |
|
155 |
|
|
149 | 156 |
setupScreen(width,height); |
157 |
|
|
158 |
Distorted.onSurfaceChanged(width, height); |
|
150 | 159 |
} |
151 | 160 |
|
152 | 161 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
156 | 165 |
GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); |
157 | 166 |
|
158 | 167 |
setupBitmaps(); |
159 |
|
|
168 |
|
|
160 | 169 |
try |
161 | 170 |
{ |
162 | 171 |
Distorted.onSurfaceCreated(mView.getContext()); |
... | ... | |
347 | 356 |
if( objectID == gffaID ) |
348 | 357 |
{ |
349 | 358 |
mRoot.detach(mGFFAQueue); |
350 |
mGFFAQueue.delete();
|
|
359 |
mGFFAQueue.abortAllEffects();
|
|
351 | 360 |
mGFFATexture.markForDeletion(); |
352 | 361 |
|
353 | 362 |
int screenW=mScreenTexture.getWidth(); |
... | ... | |
373 | 382 |
else if( objectID==logoID ) |
374 | 383 |
{ |
375 | 384 |
mRoot.detach(mLogoQueue); |
376 |
mLogoQueue.delete();
|
|
385 |
mLogoQueue.abortAllEffects();
|
|
377 | 386 |
mLogoTexture.markForDeletion(); |
378 | 387 |
|
379 | 388 |
int crawlW = mCrawlTexture.getWidth(); |
... | ... | |
406 | 415 |
{ |
407 | 416 |
mRoot.detach(mBackground); |
408 | 417 |
mBackground.detach(mCrawlQueue); |
409 |
mCrawlQueue.delete();
|
|
418 |
mCrawlQueue.abortAllEffects();
|
|
410 | 419 |
mCrawlTexture.markForDeletion(); |
411 |
mCrawlBackgroundQueue.delete();
|
|
420 |
mCrawlBackgroundQueue.abortAllEffects();
|
|
412 | 421 |
mCrawlBackgroundTexture.markForDeletion(); |
413 | 422 |
} |
414 | 423 |
} |
Also available in: Unified diff
Some improvements for StarWars's behaviour after onPause(), but it doesn't really work yet.
Remaining 'onPause-buggy' apps: StarWars, Save.