aduros/flambe — pull request #289 by Antriel (2014-08-27 15:21:08+00:00)
Title: Handling lost gpu context on stage3d

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_loss`

Notes:
* Increases memory usage. If that is a problem it should be possible to reload the data from source, I didn't need it though and it would be more complicated. @purplepwny has implemented embedded assets with flash preloader, which I improved for my needs. There it would make more sense to load from source (since it's embedded).
* For some reason my builds sometimes fail with *flambe.platform.BasicTexture.R has no field readPixels/writePixels/createTexture*. If I remove @:generic from BasicTexture it works. It also works if I return back again after it compiled first time. Not sure what is going on.
* Fixes #217