Haxeflixel next issues with grabbing screen
So for a lot of the transitions I currently do I grab the screen and then delete the actual FlxSprites for transitions in order to keep the frame rate high on mobile. It works wonderful in Legacy but unwanted results occur during next.
and on cpp target it crashes.
I use this code for screen grabbing and setting as an FlxSprite
// Creating BitmapData object var BITMAP:BitmapData = new BitmapData( FlxG.width, FlxG.height, true, 0x0 ); // Draw canvas BITMAP.draw( FlxG.camera.canvas ); // FlxG.stage can also be used // New FlxSprite var screen2 = new FlxSprite(); // Loading the bitmap into the sprite screen2.loadGraphic( BITMAP, false ); FlxG.state.add(screen2);