I try minimize the problem and this code show the problem (problem with cacheAsBitmap)
in openfl/lime 7.1.1 / 6.1.0 - works fine
in openfl/lime 8.3.0 / 6.4.0 - hide the sprite
class Main extends Sprite {
public function new () {
super ();
var sprite_holder = new Sprite ();
var sprite = new Sprite ();
sprite.graphics.beginFill (0);
sprite.graphics.drawRect (0, 0, 100, 100);
sprite_holder.addChild (sprite);
sprite_holder.cacheAsBitmap = true;
sprite_holder.transform.colorTransform = new ColorTransform (0, 0, 0, 1, 255, 0, 0, 0);
addChild(sprite_holder);
}
}
Not directly with Openfl, for now, you have to use the Bitmap-font library. But the haxelib repo is outdated. The most recent update can be found here (don’t know if it works): https://github.com/vwr0527/BitmapFont
The primary issue was that cacheAsBitmap in OpenFL 8 now triggers a “child” OpenGL render. Returning back to the “parent” OpenGL renderer was not properly restoring any masks