Open
Conversation
… initialization that may be asynchronous. FlashPlatform's initialization is actually asynchronous, in that we must wait for Stage3DRenderer to acquire a Context3D before we're ready to roll. Since the Flash platform requires a Context3D before textures can be loaded, quickly loading textures after calling System.init was causing undesirable behavior, due a Context3D not yet being available. With this change, we can wait for a platform to become ready before continuing with other work.
…pdata and reuploading when context is regenerated
Contributor
|
Very nice! Could it be optional to store all bitmaps in memory? Maybe I'm okay just by restart+reloading the app. |
Contributor
Author
|
Well now it shouldn't crash even if you don't enable handling of context loss. So you should be able to just listen to when GPU context is recreated and restart the game. |
Contributor
|
Ah that is awesome! Will try soon! 👍 |
|
Hey guys, did it work for anyone? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Primitive way to handle lost context. Keeps texture data in memory when created via createTextureFromImage. Custom made textures need to listen on hasGPU and recreate manually.
usage - add compiler flag:
-D stage3d_handle_context_lossNotes: